Skip to content

Commit 1d769b5

Browse files
ANDREI LISAsjohnr
authored andcommitted
make XML and Java/Kotlin consistent with AspectJExpressionPointcut
1 parent 0beda02 commit 1d769b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/modules/ROOT/pages/servlet/authorization/method-security.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,8 +1265,8 @@ import static org.springframework.security.authorization.AuthorityAuthorizationM
12651265
@Bean
12661266
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
12671267
static Advisor protectServicePointcut() {
1268-
JdkRegexpMethodPointcut pattern = new JdkRegexpMethodPointcut();
1269-
pattern.setPattern("execution(* com.mycompany.*Service.*(..))");
1268+
AspectJExpressionPointcut pattern = new AspectJExpressionPointcut();
1269+
pattern.setExpression("execution(* com.mycompany.*Service.*(..))");
12701270
return new AuthorizationManagerBeforeMethodInterceptor(pattern, hasRole("USER"));
12711271
}
12721272
----
@@ -1281,8 +1281,8 @@ companion object {
12811281
@Bean
12821282
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
12831283
fun protectServicePointcut(): Advisor {
1284-
var pattern = JdkRegexpMethodPointcut();
1285-
pattern.setPattern("execution(* com.mycompany.*Service.*(..))");
1284+
var pattern = AspectJExpressionPointcut();
1285+
pattern.setExpression("execution(* com.mycompany.*Service.*(..))");
12861286
return new AuthorizationManagerBeforeMethodInterceptor(pattern, hasRole("USER"));
12871287
}
12881288
}

0 commit comments

Comments
 (0)