当前位置:   article > 正文

springboot 异常 - Failed to convert value of type_resolved [org.springframework.web.method.annotatio

resolved [org.springframework.web.method.annotation.methodargumenttypemismat

Resolved [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: "50.5"]

大致意思:
未能将类型“java.lang.String”的值转换为所需类型“java.lang.Integer”;嵌套异常为java.lang.NumberFormatException:对于输入字符串:“50.5”]

这种错误一般是前端传的参数,后端解析失败,造成的,也就是穿的是非法参数,比如上边前端给我一个浮点数,后端在字符串解析为数字的时候,就会解析失败!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/229784
推荐阅读
相关标签
  

闽ICP备14008679号