SpringUtils工具类
@SuppressWarnings("unchecked")
public static <T> T getAopProxy(T invoker)
{
return (T) AopContext.currentProxy();
}
调用getAopProxy方法
@Override
public List<SysRole> selectRoleAll() {
return SpringUtils.getAopProxy(this).selectRoleList(new SysRole());
}
@EnableAspectJAutoProxy(exposeProxy = true,proxyTargetClass = true)已加,调用selectRoleAll方法
一直报错 Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available, and ensure that AopContext.currentProxy() is invoked in the same thread as the AOP invocation context.] with root cause