mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-26 13:53:14 +00:00
Fix Typo in Sample
Closes gh-11095
This commit is contained in:
parent
ffdb397830
commit
2028507bf8
@ -547,7 +547,7 @@ class MethodSecurityConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||||
public Advisor customAuthorize(AuthorizationManager<MethodInvocationResult> rules) {
|
public Advisor customAuthorize(AuthorizationManager<MethodInvocationResult> rules) {
|
||||||
AnnotationMethodMatcher pattern = new AnnotationMethodMatcher(MySecurityAnnotation.class);
|
AnnotationMatchingPointcut pattern = new AnnotationMatchingPointcut(MySecurityAnnotation.class);
|
||||||
AuthorizationManagerAfterMethodInterceptor interceptor = new AuthorizationManagerAfterMethodInterceptor(pattern, rules);
|
AuthorizationManagerAfterMethodInterceptor interceptor = new AuthorizationManagerAfterMethodInterceptor(pattern, rules);
|
||||||
interceptor.setOrder(AuthorizationInterceptorsOrder.POST_AUTHORIZE_ADVISOR_ORDER.getOrder() + 1);
|
interceptor.setOrder(AuthorizationInterceptorsOrder.POST_AUTHORIZE_ADVISOR_ORDER.getOrder() + 1);
|
||||||
return interceptor;
|
return interceptor;
|
||||||
@ -563,7 +563,7 @@ class MethodSecurityConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||||
fun customAuthorize(rules : AuthorizationManager<MethodInvocationResult>) : Advisor {
|
fun customAuthorize(rules : AuthorizationManager<MethodInvocationResult>) : Advisor {
|
||||||
val pattern = AnnotationMethodMatcher(MySecurityAnnotation::class.java);
|
val pattern = AnnotationMatchingPointcut(MySecurityAnnotation::class.java);
|
||||||
val interceptor = AuthorizationManagerAfterMethodInterceptor(pattern, rules);
|
val interceptor = AuthorizationManagerAfterMethodInterceptor(pattern, rules);
|
||||||
interceptor.setOrder(AuthorizationInterceptorsOrder.POST_AUTHORIZE_ADVISOR_ORDER.getOrder() + 1);
|
interceptor.setOrder(AuthorizationInterceptorsOrder.POST_AUTHORIZE_ADVISOR_ORDER.getOrder() + 1);
|
||||||
return interceptor;
|
return interceptor;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user