怎样进行spring acegi URL权限配置

believefym believefym 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
意思就是只有具有相应权限的用户才能打开相应的url, 这个应该怎么配置,哪位能给个例子?

下面的代码能不能做到访问/writeAction.do的时候要求具有ROLE_WRITER?能不能给分析一下
[Quote=]
com.xxx.WriteAction.execute=ROLE_WRITER
[/Quote]



<bean id="methodDefinitionSourceAdvisor"
class="org.acegisecurity.intercept.method.aopalliance.MethodDefinitionSourceAdvisor">
<constructor-arg>
<bean
class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager">
<ref bean="authenticationManager" />
</property>
<property name="accessDecisionManager">
<ref bean="methodAccessDecisionManager" />
</property>
<property name="objectDefinitionSource">
<value> com.xxx.WriteAction.execute=ROLE_WRITER

</value>
</property>
</bean>
</constructor-arg>
</bean>
...全文

相关推荐

评论 21
收藏 已收藏
分享
返回顶部
believefym
Web 开发 81,108 成员 341,721 内容