Last active
December 14, 2015 07:08
-
-
Save odrotbohm/5047742 to your computer and use it in GitHub Desktop.
Lazy-init config for SpringSecurity PermissionEvalutor implementations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<security:global-method-security pre-post-annotations="enabled"> | |
<security:expression-handler ref="methodExpressionHandler"/> | |
</security:global-method-security> | |
<bean id="methodExpressionHandler" class="org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler"> | |
<property name="permissionEvaluator"> | |
<bean class="org.springframework.aop.framework.ProxyFactoryBean"> | |
<property name="targetSource"> | |
<bean class="org.springframework.aop.target.LazyInitTargetSource"> | |
<property name="targetBeanName" value="evaluator" /> | |
</bean> | |
</property> | |
<property name="proxyInterfaces" value="org.springframework.security.access.PermissionEvaluator" /> | |
</bean> | |
</property> | |
</bean> | |
<bean id="evaluator" class="security.RepositoryPermissionEvaluator" autowire="byType" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment