Closed zhuangyuxuan closed 5 years ago
1.今天在本地搭建一套xxl-job测试项目的是时候,也遇到了同样的问题,当logId超过1000后,问题就会复现: 具体情况如下:
发现admin模块 controller 层 springmvc 接收logId 不成功,具体的提示如下:
18:08:19.734 logback [http-nio-10100-exec-1] WARN o.s.w.s.m.s.DefaultHandlerExceptionResolver - Resolved [org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "1,013"]
好奇:为什么前端传来的整型数值,会变成千分位字符串?
@zhuangyuxuan @ioiioo 感谢反馈! 这是升级springboot的时候丢失freemarker配置导致的,在调度中心里添加一行配置即可:
spring.freemarker.settings.number_format=0.##########
可参考该commit:https://github.com/xuxueli/xxl-job/commit/2337f8ef42be76156dd674aadc663c21ac5bc22b
已经修复并推送master分支,将会跟随下个小版本一同发布。
已经发布新版本修复这个问题,可以从 v2.0.0 直接覆盖更新:https://github.com/xuxueli/xxl-job/releases/tag/v2.0.1
Please answer some questions before submitting your issue. Thanks!
Which version of XXL-JOB do you using?
Expected behavior
Actual behavior
Steps to reproduce the behavior
Other information