我有一个与示例booking-faces相关的问题,使用spring security intercept-url pattern="/secure"中的参数what's is mapping?,/secure配置在哪里。唐克斯。
发布于 2013-05-12 15:56:59
正如here所述,SpringSecurity有助于解决Java应用程序的安全问题。下面配置意味着,在应用程序中访问以secure启动的任何网址的用户应该具有ROLE_SUPERVISOR权限
<security:intercept-url pattern="/secure" method="POST" access="hasRole('ROLE_SUPERVISOR')"/>根据配置,您可以使用以下用户登录(他们拥有ROLE_SUPERVISOR权限)
keith/melbourne
erwin/leuven添加了
在Web.xml中通过过滤器配置SpringSecurity,它会入侵所有URL:
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> 所有SpringSecurity都在SpringSecurity配置文件中进行配置,如this
您可以在文件中找到/secure:<security:intercept-url pattern="/secure" ...的模式
https://stackoverflow.com/questions/16503181
复制相似问题