1. 程式人生 > >BUG(3) : Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer';

BUG(3) : Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer';

Failed to bind request element: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "on"

表單提交時,有個欄位型別為字串(不可轉int的字串),後臺用的Integer接收,把Integer換成String即可

END