1:BUG详细描述:
在访问 http://localhost:8090/sm/user/showUser 时控制台出现台下错误:
[org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping]Mapping [/user/showUser] to HandlerExecutionChain with handler [[email protected]] 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 [[email protected]]: 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 [[email protected]]: 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 [[email protected]]: 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")后在次访问