我很懒所以是fw 2019-04-28 19:16 采纳率: 0%
浏览 2191

spring boot 整合shiro 会有提示错误但是项目可以运行

spring boot 整合shiro

会出现提示
2019-04-28 19:12:14.137 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'shiroLifecycleBeanPostProcessorConfig' of type [com.example.main.system.config.ShiroLifecycleBeanPostProcessorConfig$$EnhancerBySpringCGLIB$$d4f2907a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:14.167 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'shiroSpringConfig' of type [com.example.main.system.config.ShiroSpringConfig$$EnhancerBySpringCGLIB$$ec32d4af] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.017 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'mybatis-org.mybatis.spring.boot.autoconfigure.MybatisProperties' of type [org.mybatis.spring.boot.autoconfigure.MybatisProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.027 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration' of type [org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$56ee132b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.037 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'druidConfigration' of type [com.example.main.system.config.DruidConfigration$$EnhancerBySpringCGLIB$$64cea3f6] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.097 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSource' of type [com.alibaba.druid.pool.DruidDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.347 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'sqlSessionFactory' of type [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.347 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'sqlSessionTemplate' of type [org.mybatis.spring.SqlSessionTemplate] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.347 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'userLoginMapper' of type [org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.357 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'userLoginMapper' of type [com.sun.proxy.$Proxy66] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.357 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'userLoginServiceImp' of type [com.example.main.service.impl.UserLogin.UserLoginServiceImp] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.357 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'itDragonShiroRealm' of type [com.example.main.system.shiro.ITDragonShiroRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.357 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'securityManager' of type [org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-28 19:12:15.397 INFO 12628 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$2419c1fb] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

项目可以运行 shiro也有作用 为什么会报这个错误

  • 写回答

1条回答

  • 萨迪奥·马内 2019-05-12 16:22
    关注

    Spring会实例化FactoryBean,以确定其创建的bean的类型。

    由于ShiroFilterFactoryBean实现了FactoryBean接口,所以它会提前被初始化。又因为SecurityManager依赖Realm实现类、Realm实现类又依赖userLoginServiceImp,所以引发所有相关的bean提前初始化。

    ShiroFilterFactoryBean -> SecurityManager -> Realm实现类 -> userLoginServiceImp

    但是此时还只是ApplicationContext中registerBeanPostProcessors注册BeanPostProcessor处理器的阶段,此时AnnotationAwareAspectJAutoProxyCreator还没有注册到BeanFactory中,故无法对userLoginServiceImp进行事务处理和aop编程等操作。

    评论

报告相同问题?

悬赏问题

  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度