Conditional behavior of Spring-AOP Before Advice
问题 I'm a little new to AOP, and got confused about the problem I'm facing. I have the Annotation @AuthorizeUser which acts on methods, on Presentation Layer. I need to check if User is authorized to execute that method or not. Here is the code for AuthorizeUserAspect : @Aspect public class AuthorizeUserAspect { @AuthoWired private UserService service; @Before(value = "@annotation(com.company.annotation.AuthorizeUser)") public void isAuthorized(JoinPoint jp) { // Check if the user has permission