出现错误:
java.lang.IllegalStateException: No MethodInvocation found: Check that an AOP invocation is in progress, and that the ExposeInvocationInterceptor is upfront in the interceptor chain. Specifically, note that advices with order HIGHEST_PRECEDENCE will execute before ExposeInvocationInterceptor!
解决方法:
DefaultAdvisorAutoProxyCreator设置参数usePrefix为true,如下
<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor">
<property name="proxyTargetClass" value="true" />
<property name="usePrefix" value="true" />
</bean>
原因详见:
https://blog.youkuaiyun.com/qq_33306246/article/details/106573462