1
0
mirror of synced 2026-08-05 01:36:56 +00:00

SEC-1232: GlobalMethodSecurityBeanDefinitionParser support for mode='aspectj'

AspectJ sample application context also updated to use this syntax.
This commit is contained in:
Luke Taylor
2010-03-31 16:55:02 +01:00
parent 42cdaa0ce2
commit 6354c7e052
7 changed files with 54 additions and 46 deletions
+8
View File
@@ -0,0 +1,8 @@
dependencies {
compile project(':spring-security-core')
aspectpath project(':spring-security-aspects')
runtime project(':spring-security-config'),
project(':spring-security-aspects')
}
@@ -1,41 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.3.xsd">
<bean id="aspectJSecurityInterceptor"
class="org.springframework.security.access.intercept.aspectj.AspectJMethodSecurityInterceptor">
<property name="authenticationManager" ref="authenticationManager" />
<property name="accessDecisionManager" ref="accessDecisionManager" />
<property name="securityMetadataSource">
<bean
class="org.springframework.security.access.annotation.SecuredAnnotationSecurityMetadataSource" />
</property>
</bean>
<bean id="authenticationManager"
class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<bean
class="org.springframework.security.authentication.TestingAuthenticationProvider" />
</property>
</bean>
<bean id="accessDecisionManager"
class="org.springframework.security.access.vote.AffirmativeBased">
<property name="decisionVoters">
<list>
<bean
class="org.springframework.security.access.vote.RoleVoter" />
</list>
</property>
</bean>
<bean
class="org.springframework.security.access.intercept.aspectj.aspect.AnnotationSecurityAspect"
factory-method="aspectOf">
<property name="securityInterceptor" ref="aspectJSecurityInterceptor" />
</bean>
<sec:global-method-security secured-annotations="enabled" mode="aspectj" />
<bean class="sample.aspectj.Service" />