Java 在SpringSecurity中,如何绕过URL的GET方法;但不是邮局
如何配置,以便自定义筛选器绕过URL的获取版本,而不是该URL的发布版本。我尝试在中使用“filters=none”,但它不起作用。我的配置如下:Java 在SpringSecurity中,如何绕过URL的GET方法;但不是邮局,java,spring,http,spring-security,Java,Spring,Http,Spring Security,如何配置,以便自定义筛选器绕过URL的获取版本,而不是该URL的发布版本。我尝试在中使用“filters=none”,但它不起作用。我的配置如下: <http auto-config='true' use-expressions="true" create-session="never" > <custom-filter position="FIRST" ref="authenticationFilter" /> <intercept-url pat
<http auto-config='true' use-expressions="true" create-session="never" >
<custom-filter position="FIRST" ref="authenticationFilter" />
<intercept-url pattern="/v0_2/app" method="GET" access="permitALL" filters="none"/> // Its not working
<intercept-url pattern="/v0_2/app" method="POST" access="permitALL" />
<intercept-url pattern="/**" access="permitALL" />
</http>
//它不起作用
即使使用“secuirty=none”选项,也没有提供http方法。它绕过URL的所有http方法
<http pattern="/v0_2/app" security="none" />
请让我知道,我怎样才能绕过GET方法
-谢谢您可以吃到以下东西:
<intercept-url pattern="/v0_2/app" method="GET" access="permitAll"/>
<intercept-url pattern="/v0_2/app" method="POST" access="hasAnyRole('ROLE_USER','ROLE_ADMIN')"/>
或
denyAll会对每个POST请求进行筛选。您看到了吗?
<intercept-url pattern="/v0_2/app" method="GET" access="permitAll"/>
<intercept-url pattern="/v0_2/app" method="POST" access="denyAll"/>