springmvc解决 405 request method post not supported(Request method 'POST' not supported)
2017-11-02 15:45
871 查看
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<map>
<entry key="/请求的文件路径/**" value="resourceHandler" />
</map>
</property>
<property name="order" value="100000" />
</bean>
<bean id="resourceHandler" name="resourceHandler"
class="org.springframework.web.servlet.resource.ResourceHttpRequestHandler">
<property name="locations" value="/请求的文件路径/" />
<property name="supportedMethods">
<list>
<value>GET</value>
<value>HEAD</value>
<value>POST</value>
<value>DELETE</value>
</list>
</property>
</bean>
<property name="urlMap">
<map>
<entry key="/请求的文件路径/**" value="resourceHandler" />
</map>
</property>
<property name="order" value="100000" />
</bean>
<bean id="resourceHandler" name="resourceHandler"
class="org.springframework.web.servlet.resource.ResourceHttpRequestHandler">
<property name="locations" value="/请求的文件路径/" />
<property name="supportedMethods">
<list>
<value>GET</value>
<value>HEAD</value>
<value>POST</value>
<value>DELETE</value>
</list>
</property>
</bean>
相关文章推荐
- 在pring框架出现 405 request method post not supported 的解决方法
- springMVC:org.springframework.web.servlet.PageNotFound.handleHttpRequestMethodNotSupported Request method 'POST' not supported
- org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported解决!
- 解决HTTP Status 405 - HTTP method POST is not supported by this URL 详解方案
- SpringMVC中HttpRequestMethodNotSupportedException时返回中文乱码分析解决
- 解决HTTP Status 405 - HTTP method POST is not supported by this URL 详解方案
- 关于解决HTTP Status 405 - HTTP method POST is not supported by this URL方法之一
- HTTP Status 405 - HTTP method POST is not supported by this URL
- Spring MVC出现POST 400 Bad Request &405 Request method 'GET' not supported
- Spring mvc 405 Request method 'POST' not support
- HTTP Status 405 - HTTP method POST/GET is not supported by this URLyi
- cors解决webapi post时报错405 method not allowed
- org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported
- Nginx HTTP Post Method: 405 Method not allowed 解决办法
- HTTP Status 405 - Request method 'POST' not supported (Spring MVC)
- HTTP Status 405 - HTTP method POST is not supported by this URL
- 出现HTTP Status 405 - HTTP method GET is not supported by this URL 原因及解决方法:
- HTTP Status 405 - HTTP method POST is not supported by this URL
- HTTP Status 405 - HTTP method GET(POST) is not supported by this URL
- HTTP Status 405 - HTTP method POST is not supported by this URL