mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 17:22:13 +00:00
45 lines
1.7 KiB
XML
45 lines
1.7 KiB
XML
<?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-2.0.xsd">
|
|
|
|
<bean id="aspectJSecurityInterceptor"
|
|
class="org.springframework.security.access.intercept.aspectj.AspectJSecurityInterceptor">
|
|
<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>
|
|
|
|
<bean class="sample.aspectj.Service" />
|
|
|
|
<bean class="sample.aspectj.SecuredService" />
|
|
|
|
</beans>
|