springboot项目中运行spring security 报 Error creating bean with name 'springSecurityFilterChain'错误
资讯 2024-07-10 阅读:52 评论:0简单理解:在启动springboot项目时,会自动去加载SecurityConfig这个类?里面的配置(SecurityConfig类是自己写的,用来继承WebSecurityConfigurerAdapter 实现自定义登录),其他底层的不多说,解决方案:在springboot启动类中加入手动注解,?
: automatically load the SecurityConfig class when starting the Springboot project?
这样子再次启动springboot就无问题了
原因:是 [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class] 在类路径资源中定义名称为“springSecurityFilterChain”的Bean创建错误,不像springboot 2.xxx版本是自动扫描的,所以这里需要手动添加
建议:使用springboot版本2.xxx 以上,方便快捷
there is no problem in starting Springboot again: [org/springframework/security/config/contentation/web/configuration/WebSecurityConfuture.clas] The Bean creation error defined in the class of path resources as “springSecurityFilter Chain”, unlike the Springboot 2.xx version is automatically scanned, requires manual addition of
recommendations: using Springboot version 2.xx above, to facilitate
————————————————
原文链接:https://blog.csdn.net/qq_37736010/article/details/104894948
link to original text: https://blog.csdn.net/qq_37736010/article/details/104894948
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论