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. css - 如何把一個視圖放在左浮動定位的視圖的上面?2. javascript - axios請求回來的數據組件無法進行綁定渲染3. php多任務倒計時求助4. python的正則怎么同時匹配兩個不同結果?5. javascript - vue中怎么使用原生js插件6. javascript - 請問下面代碼中的...是擴展運算符還是操作運算符?這樣寫是什么意思?7. javascript - 小demo:請教怎么做出類似于水滴不斷擴張的效果?8. css - 子元素跑到父元素外面9. MySQL的聯合查詢[union]有什么實際的用處10. javascript - jquery怎么讓a標簽跳轉后保持tab的樣式
