org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST'

2017-01-14 19:44:48来源:CSDN作者:you23hai45人点击

1、错误描述

严重: Servlet.service() for servlet [springmvc] in context with path [/] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root causejava.lang.NullPointerException	at core.interceptor.ExceptionResolverCustom.resolveException(ExceptionResolverCustom.java:79)	at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1161)	at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:998)	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)	at java.lang.Thread.run(Thread.java:745)2017-01-14 16:17:27,771 [http-apr-8080-exec-7] ERROR [core.interceptor.ExceptionResolverCustom] - Request method 'POST' not supported  org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported	at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.handleNoMatch(RequestMappingInfoHandlerMapping.java:198)	at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.lookupHandlerMethod(AbstractHandlerMethodMapping.java:301)	at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:248)	at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:57)	at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:299)	at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1098)	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:910)	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)	at java.lang.Thread.run(Thread.java:745)

2、错误原因


3、解决办法

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台