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. javascript - 我写的href跳转地址不是百度,为什么在有的机型上跳转到百度了,有的机型跳转正确2. node.js - 微信的自动回复问题3. 微信小程序如何将获取的时间戳提交到数据库?4. python3.x - python中import theano出错5. python - pandas按照列A和列B分组,将列C求平均数,怎样才能生成一个列A,B,C的dataframe6. python - 如何给模块传参数,参数是模块的函数名?7. python - 老铁们,在列表中如何对时间进行排序~8. mysql - 为什么innodb下更新A行时B行也被锁住?9. node.js - nodejs中mysql子查询返回多行结果怎么处理?10. mysql - spring data jpa 方法sql复杂查询?