我发现这句法这里对我的作品!
@Pointcut("execution(@(@org.springframework.web.bind.annotation.RequestMapping *) * *(..))")public void requestMappingAnnotations() { }我也可以全部列出
@Pointcut("within(aa.bb.*.rest..*) && @within(org.springframework.web.bind.annotation.RestController)")public void restControllers() {}@Pointcut("@annotation(org.springframework.web.bind.annotation.RequestMapping) " + "|| @annotation(org.springframework.web.bind.annotation.GetMapping)" + "|| @annotation(org.springframework.web.bind.annotation.PostMapping)" + "|| @annotation(org.springframework.web.bind.annotation.PatchMapping)" + "|| @annotation(org.springframework.web.bind.annotation.PutMapping)" + "|| @annotation(org.springframework.web.bind.annotation.DeleteMapping)")public void mappingAnnotations() {}@Pointcut("execution(@(@org.springframework.web.bind.annotation.RequestMapping *) * *(..))")public void requestMappingAnnotations() { }@Before("restControllers() && requestMappingAnnotations()")public void onExecute(JoinPoint jp) {}


