Skip to content

Commit

Permalink
make XML and Java/Kotlin consistent with AspectJExpressionPointcut
Browse files Browse the repository at this point in the history
  • Loading branch information
ANDREI LISA authored and sjohnr committed Nov 30, 2023
1 parent 0beda02 commit 1d769b5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
----
Expand All @@ -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"));
}
}
Expand Down

0 comments on commit 1d769b5

Please sign in to comment.