简体   繁体   中英

Spring Security environment specific intercept-url

Here is the Spring Security intercept-url configuration:

<intercept-url pattern="/**.html"
                       access="ROLE_USER" requires-channel="https" />

I want to make requires-channel="any" for local environment. Is it possible to add absolute URL in the pattern?

You can use Spring bean definition profiles to achieve that.

<beans profile="local">

</beans>

It's a new feature. Take a look at the entry in Spring Source blog: http://blog.springsource.com/2011/02/11/spring-framework-3-1-m1-released/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM