package com.coolfly.springboot.aop;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
/**
* Description: AopAdvice <br>
*
* @author coolfly
* @date 2022-01-20 11:25
*/
@Aspect
@Component
public class AopAdvice {
@Before("execution(* com.coolfly.springboot.aop.AopController.*(..))")
public void beforeEnter() {
System.out.println(" welcome enter");
}
@After("execution(* com.coolfly.springboot.aop.AopController.*(..))")
public void afterLeave() {
System.out.println(" say you");
}
}