java - Springboot Aop !運算符報錯
問題描述
@Pointcut(' ! execution(* com.tadmin.admin.Control.Login.*(..))') void my(){}
&&、||都可用就是!不可用報錯:
at com.tadmin.admin.aop.MyAspect.around(MyAspect.java:38) ~[classes/:na] at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]*** java.lang.instrument ASSERTION FAILED ***: '!errorOutstanding' with message transform method call failed at JPLISAgent.c line: 844
問題解答
回答1:@Pointcut('execution(* com.tadmin.admin.Control.*.*(..)) && !execution(* com.tadmin.admin.Control.Login.*(..))')
兩個execution語句就可用了
相關文章:
1. android - weex 項目createInstanceReferenceError: Vue is not defined2. android - 哪位大神知道java后臺的api接口的對象傳到前端后輸入日期報錯,是什么情況?求大神指點3. pdo 寫入到數據庫的內容為中文的時候寫入亂碼4. PHPExcel表格導入數據庫怎么導入5. javascript - 如圖,百度首頁,查看源代碼為什么什么都沒有?6. vue2.0+webpack 如何使用bootstrap?7. PHP類封裝的插入數據,總是插入不成功,返回false;8. mac連接阿里云docker集群,已經卡了2天了,求問?9. python - 小白django提交數據后,沒有存儲到數據庫(查閱資料并沒有發現問題)10. javascript - 前端開發框架express,在他的模板引擎下怎么給按鈕添加綁定事件?
