<aop:pointcut expression="execution(* com.xxx.dao.FooDao.*(..))"> 这个表达式里可以写and or not,不过注意两边要有空格 如"xxx and bbb","xxx and not bbb"
不过,文档的表达式里都用&& || !,很是奇怪, 因为代码里替换了,呵呵 org.springframework.aop.aspectj.AspectJExpressionPointcut
private String replaceBooleanOperators(String pcExpr) { String result = StringUtils.replace(pcExpr, " and ", " && "); result = StringUtils.replace(result, " or ", " || "); result = StringUtils.replace(result, " not ", " ! "); return result; }
|