最近写spring aop切面的时候,在一些方法上加了切点,然后在切面中添加对应切点的方法,但是有些切点的方法不执行,有的执行。下面是两个不进入的切点方法,希望大神帮忙看下问题出在哪!
/*测试切面start*/
@Pointcut("execution(* com.ksource.esp.service.casehandle.PointCaseServiceImpl.getList (..))")
public void pointCaseList(){};
@Pointcut("execution(* com.ksource.esp.web.casehandle.InspectionDocumentController.indexDetail (..))")
public void statisPointCase(){};
@AfterReturning("pointCaseList()")
public void afterList(JoinPoint joinPoint)throws ClassNotFoundException, SecurityException, NoSuchMethodException,
IllegalArgumentException, IllegalAccessException,
InvocationTargetException {
System.out.println("案由列表后"+joinPoint.getArgs().toString());
}
@Before("statisPointCase()")
public void afterStatis(JoinPoint joinPoint)throws ClassNotFoundException, SecurityException, NoSuchMethodException,
IllegalArgumentException, IllegalAccessException,
InvocationTargetException {
System.out.println("统计案由后:"+joinPoint.getArgs().toString());
}