@Slf4j
@Aspect
@Component
public class MVCAspectJComponent {
@Pointcut("@within(org.springframework.web.bind.annotation.RestController) " +
"|| @within(org.springframework.stereotype.Controller)")
public void postCut(){}
@Around("postCut()")
public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
log.info("MVCAspectJComponent#around before");
Object object = joinPoint.proceed();
log.info("MVCAspectJComponent#around after");
return object;
}
}