[英]Spring Security filter, HTTP Status 405 - Request method 'POST' not supported
I have done my RESTful Webservice along with the same project that implements Admin panel application. 我已经完成了RESTful Web服务以及实现管理面板应用程序的同一项目。 The problem i face is that the POST request comes to the application gets converted to GET.
我面临的问题是POST请求到应用程序被转换为GET。
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
When the filter got commented everything works as normal. 过滤器收到评论后,一切正常。
Other GET requests are having no problem in both case when filter is present or not. 无论是否存在过滤器,其他两种GET请求都不会出现问题。
error i get is 我得到的错误是
HTTP Status 405 - Request method 'POST' not supported
How can i override Spring security filter for my Web service ? 如何覆盖Web服务的Spring安全过滤器?
solved 解决了
Just un-comment any resource if you don't want authentication to be done on them 如果您不希望对它们进行身份验证,请取消注释任何资源
@ spring security.xml file add the following. 在@spring security.xml文件中添加以下内容。
<http pattern="/webservice/**" security="none"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.