美文网首页
springboot 使用AOP

springboot 使用AOP

作者: 蜗牛_3c49 | 来源:发表于2019-07-12 10:08 被阅读0次

@Aspect 将该注解标注到一个类,表示为切面类

@Pointcut("execution(public * com.example.demo3.web.*.*.*(..))")

public void webSession(){

}

指定切入的位置为web包下的所有方法

@Around("webSession()")

public Object around(ProceedingJoinPoint pjp){

}

环绕切入webSession方法,以上实现对所有web包下的方法都切入around方法处理

相关文章

网友评论

      本文标题:springboot 使用AOP

      本文链接:https://www.haomeiwen.com/subject/vqoskctx.html