我很懒所以是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编程等操作。

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?