在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/C  網(wǎng)絡(luò)安全/ spring AOP注解方式下不進(jìn)切面方法

spring AOP注解方式下不進(jìn)切面方法

最近寫(xiě)spring aop切面的時(shí)候,在一些方法上加了切點(diǎn),然后在切面中添加對(duì)應(yīng)切點(diǎn)的方法,但是有些切點(diǎn)的方法不執(zhí)行,有的執(zhí)行。下面是兩個(gè)不進(jìn)入的切點(diǎn)方法,希望大神幫忙看下問(wèn)題出在哪!

/*測(cè)試切面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("統(tǒng)計(jì)案由后:"+joinPoint.getArgs().toString());
    }
回答
編輯回答
汐顏

getList (..)),中間沒(méi)有空格,應(yīng)該getList(..)),這個(gè)indexDetail (..))也是。

2017年3月30日 23:01