Spring 示例url模式="/“安全”;
我有一个与示例相关的问题,关于spring中的参数Spring 示例url模式="/“安全”;,spring,spring-security,spring-webflow,Spring,Spring Security,Spring Webflow,我有一个与示例相关的问题,关于spring中的参数 security intercept url pattern=“/secure”什么是映射?,其中配置了/secure。 thnks.SpringSecurity有助于解决JavaEE应用程序的安全问题。 下面的配置意味着,在应用程序中访问以secure开头的任何URL的用户应具有角色\u SUPERVISOR权限 <security:intercept-url pattern="/secure" method="POST" access
security intercept url pattern=“/secure”
什么是映射?,其中配置了/secure
。
thnks.SpringSecurity有助于解决JavaEE应用程序的安全问题。 下面的配置意味着,在应用程序中访问以
secure
开头的任何URL的用户应具有角色\u SUPERVISOR
权限
<security:intercept-url pattern="/secure" method="POST" access="hasRole('ROLE_SUPERVISOR')"/>
keith/melbourne
erwin/leuven
已添加
SpringSecurity由筛选器在Web.xml中配置,它接受所有URL:
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
springSecurityFilterChain
/*
所有SpringSecurity都在SpringSecurity配置文件中配置,如
您可以在文件中找到指向
/secure
:Thnks的模式作为答案,我知道这是,但是如果您查看web.xml,页面将通过/spring//spring/*进行映射,并且在文件security-config.xml中,您会看到webflow也使用默认的目标url=“/spring/main”,其中是“/secure”映射还是配置?,thnks.SpringSecurity由filter在Web.xml中配置,它接受所有URL:springSecurityFilterChain/*
是的,当然过滤器会截取所有URL,但是如果在Web.xml中查看所有页面都是这样开始的,并且流类似于/spring/main.xml,我看不到/security的位置,可能我错过了你的问题,但是SpringSecurity的配置如下:1)你在web.xml中添加了springSecurityFilterChain 2)你在SpringSecurity配置文件中配置了所有员工:你可以在文件中找到安全模式:你想让我更好地澄清我的答案吗?