Browse Source

添加多种类型

王智勇 5 years ago
parent
commit
6bd2d6317e
1 changed files with 7 additions and 4 deletions
  1. 7 4
      source/_posts/aop.md

+ 7 - 4
source/_posts/aop.md

@@ -101,9 +101,12 @@ public class ParamCheckAspect {
 
     private static final Logger logger = Logger.getLogger(ParamCheckAspect.class);
 
-    //todo 暂时使用 方法扫描 以 O 结尾的方法 标识对外的接口 后期改为 @args
-//    @Pointcut("@args(com.ys.atds.annotation.ParamCheck)")
-    @Pointcut("execution(* com.ys.*.api.impl..*.*O(..))")
+    @Pointcut("@args(com.dragon.chaofeng.annotation.ParamCheck, ..) && execution(* com.dragon.chaofeng.web..*.*(..))")
+//    @Pointcut("execution(* com.dragon.chaofeng.web..*.*(..))")
+//    @Pointcut("@args(org.springframework.web.bind.annotation.RequestBody, ..)")
+//    @Pointcut("@within(com.dragon.chaofeng.annotation.ParamCheck)")
+//    @Pointcut("execution (* com.dragon.chaofeng.service..*.*(..))")
+//    @Pointcut("@annotation(org.springframework.web.bind.annotation.RequestMapping)")
     public void paramPointcut() {
     }
 
@@ -288,4 +291,4 @@ public class ParamCheckAspect {
     }
 
 }
-```
+```