@Aspect marks a class as defining aspect logic for Spring AOP. It does not register the class as a Spring bean: Spring must manage an instance, and aspect support must be enabled separately. section 6.5 section 6.2.1
Listing 6.6 Defining an aspect class
@Aspect
public class LoggingAspect {
public void log() {
// To implement later
}
}A minimal LoggingAspect shows the annotation on the class; the class still needs to be registered as a Spring bean. section 6.2.1
Logging around a service call
A LoggingAspect can use @Around advice to log before and after CommentService.publishComment(). The annotation identifies the aspect class; the advice and its pointcut specify what to intercept and when. section 6.2.1 section 6.5
