只做记录:
@Pointcut("execution(* com.demo.service.*.*(..)) && !execution(* com.demo.service.dbservice.*(..)) ")
@Pointcut("execution(public * com.demo.service.*.*(..))")
public void serviceMethods() {
}
@Pointcut("execution(public * com.demo.service.dbservice.*(..))")
public void serviceMethods2() {
}
@Pointcut("serviceMethods() && !serviceMethods2()")
public void serviceMethods3() {
}
@Before("serviceMethods3()")
public void startLog(JoinPoint joinPoint) {
String className = joinPoint.getSignature().getDeclaringType().getSimpleName();
String methodName = joinPoint.getSignature().getName();
logger.info("{}.{} start", className, methodName);
}