SpringMVC:Null ModelAndView returned to DispatcherServlet with name 'applicationContext': assuming HandlerAdapter completed request handling

2016-3-21 diaba Spring

Null ModelAndView returned to DispatcherServlet with name 'applicationContext': assuming HandlerAdapter completed request handling

问题现象:


后台输出:


2016-03-21 16:00:40 |-DEBUG org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'applicationContext' processing GET request for [/bx/api/v2/ins/admin/retry/orderId]
2016-03-21 16:00:40 |-DEBUG o.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Looking up handler method for path /bx/api/v2/ins/admin/retry/orderId
2016-03-21 16:00:40 |-DEBUG o.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Returning handler method [public com.fengjr.insurance.common.base.BaseResult com.fengjr.insurance.pc.controller.AdministratorController.retry(java.lang.String)]
2016-03-21 16:00:40 |-DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'administratorController'
2016-03-21 16:00:40 |-DEBUG org.springframework.web.servlet.DispatcherServlet - Last-Modified value for [/bx/api/v2/ins/admin/retry/orderId] is: -1
2016-03-21 16:00:40 |-DEBUG o.s.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver - Resolving exception from handler [public com.fengjr.insurance.common.base.BaseResult com.fengjr.insurance.pc.controller.AdministratorController.retry(java.lang.String)]: org.springframework.web.bind.ServletRequestBindingException: Missing URI template variable 'orderId' for method parameter of type String
2016-03-21 16:00:40 |-DEBUG org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver - Resolving exception from handler [public com.fengjr.insurance.common.base.BaseResult com.fengjr.insurance.pc.controller.AdministratorController.retry(java.lang.String)]: org.springframework.web.bind.ServletRequestBindingException: Missing URI template variable 'orderId' for method parameter of type String
2016-03-21 16:00:40 |-DEBUG org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - Resolving exception from handler [public com.fengjr.insurance.common.base.BaseResult com.fengjr.insurance.pc.controller.AdministratorController.retry(java.lang.String)]: org.springframework.web.bind.ServletRequestBindingException: Missing URI template variable 'orderId' for method parameter of type String
2016-03-21 16:00:40 |-DEBUG org.springframework.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'applicationContext': assuming HandlerAdapter completed request handling
2016-03-21 16:00:40 |-DEBUG org.springframework.web.servlet.DispatcherServlet - Successfully completed request


原因分析:

    请求的URI找不到对应映射,@RequestMapping配置的URI中地址错误,变量要用大括号{}括起来


解决方法:

    变量部分更改为{orderId}


ok,可以正常访问了




标签: springmvc

评论:

wdgpjxydo
2016-09-20 14:13
SpringMVC:Null ModelAndView returned to DispatcherServlet with name 'applicationContext': assuming HandlerAdapter completed request handling - 韭菜园
<a href="http://www.g8a3sj143y3980tzg4l1m7nigr5fr993s.org/">awdgpjxydo</a>
wdgpjxydo http://www.g8a3sj143y3980tzg4l1m7nigr5fr993s.org/
[url=http://www.g8a3sj143y3980tzg4l1m7nigr5fr993s.org/]uwdgpjxydo[/url]
dpkgmbfjh
2016-09-20 00:27
SpringMVC:Null ModelAndView returned to DispatcherServlet with name 'applicationContext': assuming HandlerAdapter completed request handling - 韭菜园
<a href="http://www.gei0l4993km6zvu2cb3c122d4y7945dus.org/">adpkgmbfjh</a>
dpkgmbfjh http://www.gei0l4993km6zvu2cb3c122d4y7945dus.org/
[url=http://www.gei0l4993km6zvu2cb3c122d4y7945dus.org/]udpkgmbfjh[/url]
tzklbzpj
2016-09-18 17:12
SpringMVC:Null ModelAndView returned to DispatcherServlet with name 'applicationContext': assuming HandlerAdapter completed request handling - 韭菜园
<a href="http://www.g88i22qd856nn19394v4p1ezsy7utf1us.org/">atzklbzpj</a>
tzklbzpj http://www.g88i22qd856nn19394v4p1ezsy7utf1us.org/
[url=http://www.g88i22qd856nn19394v4p1ezsy7utf1us.org/]utzklbzpj[/url]

发表评论:

Powered by emlog 京ICP备15045175号-1 Copyright © 2022