最新回答 / 谁的流年浮了尘
比如说在spring aop中,当com.*.service包下的某些方法需要拦截,某些方法不需要拦截时你就可以自定义一个注解来将这些方法同需要拦截的方法区分开来,这样在定义切入点(Pointcut)的时候就很容易书写 例子:@Pointcut("execution(* com.maheng.service..*.*(..))") @Pointcut("pc1() && !@annotation(com.maheng.aop.Without)") 前者会对所有方法进行拦截...
2016-05-04