thymeleaf模板select标签传值错误java.lang.NumberFormatException: For input string:
错误:[Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'department.id'; nested exception is java.lang.NumberFormatException: For input string: "${dpm.id}"]]

发现是thymeleaf语法问题 需要解析的地方一定要加th:前缀
还可能是option标签没有默认属性值(value="")的问题
(后来测试并不是此次问题所在)
但是修改后仍是这个错误
最后发现是静态页面编译缓存问题
(如修改了属性名后运行报错内的属性名还是修改之前的属性名等现象)
解决方法:

浙公网安备 33010602011771号