首页 > 编程语言 > 详细

org.springframework.beans.TypeMismatchException

时间:2015-10-26 13:51:39      阅读:493      评论:0      收藏:0      [点我收藏+]

1:BUG详细描述:

在访问 http://localhost:8090/sm/user/showUser 时控制台出现台下错误:

[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]Mapping [/user/showUser] to HandlerExecutionChain with handler [com.ssmm.controller.UserController@55d4ee7e] and 2 interceptors
[org.springframework.web.servlet.DispatcherServlet]Last-Modified value for [/sm/user/showUser] is: -1
[org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver]Resolving exception from handler [com.ssmm.controller.UserController@55d4ee7e]: org.springframework.beans.TypeMismatchException: Failed to convert value of type ‘java.lang.String‘ to required type ‘int‘; nested exception is java.lang.NumberFormatException: For input string: "showUser"
[org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver]Resolving exception from handler [com.ssmm.controller.UserController@55d4ee7e]: org.springframework.beans.TypeMismatchException: Failed to convert value of type ‘java.lang.String‘ to required type ‘int‘; nested exception is java.lang.NumberFormatException: For input string: "showUser"
[org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver]Resolving exception from handler [com.ssmm.controller.UserController@55d4ee7e]: org.springframework.beans.TypeMismatchException: Failed to convert value of type ‘java.lang.String‘ to required type ‘int‘; nested exception is java.lang.NumberFormatException: For input string: "showUser"

2:解决方法:

    1):在showUser方法中的@RequestMapping的标签中添加(value="showUser")后在次访问

org.springframework.beans.TypeMismatchException

原文:http://cerberus.blog.51cto.com/10688966/1706259

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!