From 1d769b5afccc5a31fe140de0ecbc1e8e08c70984 Mon Sep 17 00:00:00 2001 From: ANDREI LISA Date: Thu, 30 Nov 2023 15:26:54 +0200 Subject: [PATCH] make XML and Java/Kotlin consistent with AspectJExpressionPointcut --- .../ROOT/pages/servlet/authorization/method-security.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/modules/ROOT/pages/servlet/authorization/method-security.adoc b/docs/modules/ROOT/pages/servlet/authorization/method-security.adoc index e7a2d2e5ae..5ef2629a31 100644 --- a/docs/modules/ROOT/pages/servlet/authorization/method-security.adoc +++ b/docs/modules/ROOT/pages/servlet/authorization/method-security.adoc @@ -1265,8 +1265,8 @@ import static org.springframework.security.authorization.AuthorityAuthorizationM @Bean @Role(BeanDefinition.ROLE_INFRASTRUCTURE) static Advisor protectServicePointcut() { - JdkRegexpMethodPointcut pattern = new JdkRegexpMethodPointcut(); - pattern.setPattern("execution(* com.mycompany.*Service.*(..))"); + AspectJExpressionPointcut pattern = new AspectJExpressionPointcut(); + pattern.setExpression("execution(* com.mycompany.*Service.*(..))"); return new AuthorizationManagerBeforeMethodInterceptor(pattern, hasRole("USER")); } ---- @@ -1281,8 +1281,8 @@ companion object { @Bean @Role(BeanDefinition.ROLE_INFRASTRUCTURE) fun protectServicePointcut(): Advisor { - var pattern = JdkRegexpMethodPointcut(); - pattern.setPattern("execution(* com.mycompany.*Service.*(..))"); + var pattern = AspectJExpressionPointcut(); + pattern.setExpression("execution(* com.mycompany.*Service.*(..))"); return new AuthorizationManagerBeforeMethodInterceptor(pattern, hasRole("USER")); } }