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. mysql优化 - mysql 分页查询优化。2. python - 运行django的时候出现这个django.core.exceptions.ValidationError3. javascript - 如何为大量的sprite添加碰撞检测框?4. mysql - 表名称前缀到底有啥用?5. python - requests post问题6. javascript - 手机点击input时,button会被顶上去?求解决!!!7. mysql - 仅仅只是把单引号与反斜杠转义不用prepare statement能否避免sql注入?8. python中merge后文件莫名变得非常大9. 微博2输入框一些问题10. python - 怎样在linux下开发flask web应用时查看代码出错(traceback)的地方。

网公网安备