在springboot项目使用了spring.datasource.druid.aop-patterns=xxx配置监控AOP切入点之后,shiro的各个使用@configuration、@component注解的类就无法创建成功,看报错是spring创建代理对象失败,上一个项目使用相同代码是没有问题的(pom文件换成一样的也不行,感觉是不是Maven自动依赖的jar有变化了)。请教下这个问题有没有人遇到过或者解决了?能不能分享下思路谢谢。
以下是报错:Caused by: java.lang.IllegalArgumentException: Realm argument cannot be null at org.apache.shiro.mgt.RealmSecurityManager.setRealm(RealmSecurityManager.java:62) at com.cmcc.management.shiro.ShiroConfig.securityManager(ShiroConfig.java:114) at com.cmcc.management.shiro.ShiroConfig$$EnhancerBySpringCGLIB$$7d0d99dc.CGLIB$securityManager$1(<generated>) at com.cmcc.management.shiro.ShiroConfig$$EnhancerBySpringCGLIB$$7d0d99dc$$FastClassBySpringCGLIB$$fb42f697.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) at com.cmcc.management.shiro.ShiroConfig$$EnhancerBySpringCGLIB$$7d0d99dc.securityManager(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 92 common frames omitted
暂无答案!
目前还没有任何答案,快来回答吧!