当前位置: 首页 > 工具软件 > Aspect C++ > 使用案例 >

Aspect

夏英发
2023-12-01
@Aspect
@Component
public class as {
    @Pointcut("execution(public * com.example.demo.GirlsController.*(..))")
    public void log(){

    }
    @Before("log()")
    public void c(){

    }
    @Before("execution(public * com.example.demo.GirlsController.del(..))")
    public void b(){

    }
}
 
@AfterReturning(returning = "object",pointcut = "log()")
public void d(Object object){
    
}

 类似资料: