Bean ‘securityManager‘ of type [org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible
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)
问题.
其实遇到这个打印了一堆INFO的问题, 问题不大, 简单来说我遇到这个问题是由于配置Shiro与Spring Boot整合时才会出现的问题, 原因是与Spring整合的这个ShiroFilterFactoryBean这个类实现了BeanPostProcessor这些接口, 这意味着这些东西需要非常非常早执行, 甚至早于你的Reaml的实例化, 所以对于在这个BeanPostProcessor阶段被依赖的类来说, 他们无法被Spring正常代理, (意思就是如果你的Reaml里注入了其他Service, 它无法获得代理后的特性, 比如事务), 但这个并不影响Shiro的使用, 因为Shiro在进行Authentication或者Authorization时也不需要Service或者Mapper处理事务, 它只是简单的查询, 所以其实这个问题不是大问题. 在 https://issues.apache.org/jira/browse/SHIRO-743 也有提到这个问题, 目前因为没什么大影响. (弱弱bb一句为什么这个问题从Shiro1.2带到1.6......)
如果你和我一样是强迫症患者, 你可以将SecurityManager Bean设置为延时加载, 这样就不会有一堆一堆的东西了...(当然还是会有一个)
这是修改前:
这是修改后:
是否感受到一阵酸爽...要是有更好的解决办法记得告诉我. 看到这里就意味着有机会你就要大补一下Spring框架了.
Bean ‘securityManager‘ of type [org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible相关推荐
- org.apache.shiro.web.mgt.DefaultWebSecurityManager无法转换为java.lang.SecurityManager
springboot整合shiro SecurityManager报错 Error:(27, 16) java: 不兼容的类型: org.apache.shiro.web.mgt.DefaultWeb ...
- Apache Shiro 反序列化漏洞 [org.apache.shiro.web.mgt.CookieRememberMeManager]
Apache Shiro 反序列化漏洞 2021-02-06 02:34:09,886 [http-bio-8000-exec-18] WARN [org.apache.shiro.mgt.Defa ...
- 在 Web 项目中应用 Apache Shiro
Apache Shiro 是功能强大并且容易集成的开源权限框架,它能够完成认证.授权.加密.会话管理等功能.认证和授权为权限控制的核心,简单来说,"认证"就是证明你是谁? Web ...
- 在Spring MVC中使用Apache Shiro安全框架
我们在这里将对一个集成了Spring MVC+Hibernate+Apache Shiro的项目进行了一个简单说明.这个项目将展示如何在Spring MVC 中使用Apache Shiro来构建我们的 ...
- Apache Shiro实现用户登录功能
apache shiro实现用户登录功能 配置shiro的Filter实现URL级别权限控制 配置web.xml <!-- shiro的过滤器 --> <filter>< ...
- apache shiro怎么升级_Springboot整合Shiro之授权
第二条为推广文章,阅读一次0.3kuai, 收入用于网站服务器及资源索取. Shiro是我们常用的一个权限管理框架,本文的重点是来介绍下在SpringBoot环境下我们怎么来使用Shiro. 一.添加 ...
- Apache Shiro入门
Apache Shiro入门 @(Shiro)[shiro,安全框架] Apache Shiro入门 Apache Shiro基本概述 Apache Shiro基本概念 使用Shiro能做什么 Shi ...
- Shiro学习总结(2)——Apache Shiro快速入门教程
第一部分 什么是Apache Shiro 1.什么是 apache shiro : Apache Shiro是一个功能强大且易于使用的Java安全框架,提供了认证,授权,加密,和会话管理 如同 spr ...
- SpringBoot2.x集成Apache Shiro并完成简单的Case开发
SpringBoot集成Apache Shiro环境快速搭建 在上文 Apache Shiro权限框架理论介绍 中,我们介绍了Apache Shiro的基础理论知识.本文我们将在 SpringBoot ...
最新文章
- struct2(四)编写Struct2 的Action
- 关于umask和 find命令
- zabbix 监控 elasticsearch
- html让ul的li自动居中,css ul li导航菜单居中问题解决方法
- WebService简单示例
- DUBBO与ZOOKEEPER、SPRINGMVC整合和使用
- 计算机和HMI设备通信之程序上下载
- ubuntu系统部署python3.6.4
- Wordpress 2.91 的一些良好改进
- 进击的雨燕----------基本运算符
- 数据科学包11-数据可视化
- JS中var和let
- Atitit 输入法原理与概论ati use
- 【STM32H7的DSP教程】第17章 DSP功能函数-定点数互转
- 第5章-1 输出星期名缩写 (70 分)
- 蚂蚁金服 mPaaS 模块化开发与架构重构深度解析
- python duplicated函数_16、pandas的duplicated和drop_duplicaates函数
- cad解除块的快捷命令_CAD解除编组及快捷键命令
- 微信公众号可以改名称了,只限个人订阅号!
- 2010计算机试题答案,2010全国计算机等级考试试题与答案公布
热门文章
- 【java】替换空格
- webpack5使用core-js按需兼容js “presets“: [ [“@babel/preset-env“, { “useBuiltIns“: “usage“, “corejs“:
- C语言:通讯录程序设计(多功能)
- Redis高频面试题汇总(2021最新版)
- JaveEE UDP 与 TCP 原理
- 《阿里云科技评论》第五期
- 笔记本和平板电脑中相关传感器
- oracle dim 00014,配置oracle 11g数据遇到dim
- 【OpenCV案例合集】竟还有如此的神仙代码,爱了爱了......真有趣(附3款源码)
- 联想笔记本亮度调节失效,相机无法启动,屏幕刷新率无法更改,HDR功能无法使用,显示器分辨率无法调节