ITeye博客

acegi 方法拦截配置

east_java · 2009-08-08 01:22 · Spring · Markdown

最近在测试acegi的方法拦截时候,竟然发现不成功。 对于url的拦截是成功的。 acegi中 对于方法级的安全认证需要使用的拦截器为MethodSecurityInterceptor,而应用于URL资源的安全拦截器为FilterSecurityInterceptor 。其中,MethodSecurityInterceptor拦截器是借助于Spring Aop实现的,而FilterSecurityInterceptor拦截器是借助于Servlet Filter 实现的。

查看了下配置文件,竟然发现没有配置methodsecurityinterceptor的aop。 aop的配置可以看看http://www.java1995.org/article/753.html

proxyTargetClass属性的意义 http://www.java1995.org/article/752.html

<bean id="autoProxyCreator"
		class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
		<!-- property name="proxyTargetClass" value="true" /-->
		<property name="beanNames">
			<list>
				<value>*Service</value>
			</list>
		</property>

		<property name="interceptorNames">
			<list>
				<value>methodSecurityInterceptor</value>
			</list>
		</property>
	</bean>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。