BigDecimal的divide和setScale出现的deprecated警告
setScale(2, BigDecimal.ROUND_HALF_UP)改成setScale(2, RoundingMode.HALF_UP)就搞定了。对照表如下:java.math.BigDecimal.ROUND_CEILING Use RoundingMode.CEILING instead.java.math.BigDecimal.ROUND_DOWN Use RoundingMode.DOWN instead.java.math.BigDecimal.ROUND_FLOOR Use