2020年6月5日

@RequestParam VS @RequestBody [GET/POST/PUT]

摘要: @RequestParam用来处理Content-Type: 为 application/x-www-form-urlencoded编码的内容。(Http协议中,如果不指定Content-Type,则默认传递的参数就是application/x-www-form-urlencoded类型) Requ 阅读全文

posted @ 2020-06-05 15:35 滚动的蛋 阅读(842) 评论(0) 推荐(0) 编辑

使用BigDecimal进行加减乘除计算

摘要: # java在浮点型运算时是非精确计算,如下 System.out.println(0.05 + 0.01);// 0.060000000000000005 System.out.println(1.0 - 0.42);// 0.5800000000000001 System.out.println 阅读全文

posted @ 2020-06-05 12:20 滚动的蛋 阅读(298) 评论(0) 推荐(0) 编辑

导航