Consider defining a bean of type 'org.springframework.security.authentication.AuthenticationManager' in your configuration.

[2023-04-25 14:44:36.426] [main] [ERROR] o.s.b.diagnostics.LoggingFailureAnalysisReporter - 

***************************
APPLICATION FAILED TO START
*************************** Description: Field authenticationManager in com.vipsoft.web.security.AuthorizationService required a bean of type 'org.springframework.security.authentication.AuthenticationManager' that could not be found. The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true) Action: Consider defining a bean of type 'org.springframework.security.authentication.AuthenticationManager' in your configuration. Disconnected from the target VM, address: '127.0.0.1:10059', transport: 'socket' Process finished with exit code 1

authenticationManagerBean 加上 @Bean

@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter { /**
* 解决 无法直接注入 AuthenticationManager
*
* @return
* @throws Exception
*/
@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception
{
return super.authenticationManagerBean();
}
}

Consider defining a bean of type 'org.springframework.security.authentication.AuthenticationManager' in your configuration.的更多相关文章

  1. Spring Cloud ZooKeeper集成Feign的坑1,错误:Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration.

    错误如下: ERROR 31473 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** A ...

  2. Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration

    https://www.cnblogs.com/EasonJim/p/7546136.html 错误如下: ERROR 31473 --- [ main] o.s.b.d.LoggingFailure ...

  3. Consider defining a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory' in your configuration

    Description: Parameter 0 of method redisTemplate in com.liaojie.cloud.auth.server.config.redis.Redis ...

  4. 【spring boot】mybatis启动报错:Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration. 【Mapper类不能被找到】@Mapper 和@MapperScan注解的区别

    启动报错: 2018-05-16 17:22:58.161 ERROR 4080 --- Disconnected from the target VM, address: '127.0.0.1:50 ...

  5. 解决:No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency

    错误: Description: Field jdbcTemplate in com.gwd.dao.impl.IUserDaoImpl required a bean of type 'org.sp ...

  6. SpringBoot- springboot集成Redis出现报错:No qualifying bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory'

    Springboot将accessToke写入Redisk 缓存,springboot集成Redis出现报错 No qualifying bean of type 'org.springframewo ...

  7. Field redisTemplate in xxxxxx required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be found.

    *************************** APPLICATION FAILED TO START *************************** Description: Fie ...

  8. Parameter 0 of method redisTemplate in org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration required a bean of type 'org.springframework.data.redis.connection.RedisConnectionFactor

    Error starting ApplicationContext. To display the conditions report re-run your application with 'de ...

  9. Consider defining a bean of type `xxx` in your configuration问题解决

    在使用SpringBoot装配mybatis时出现了异常 *************************** APPLICATION FAILED TO START *************** ...

  10. springboot 工程启动报错之Consider defining a bean of type ‘XXX’ in your configuration.

    一.前言: 使用springboot自动注入的方式搭建好了工程,结果启动的时候报错了!!!,错误如下图: Description: Field userEntityMapper in com.xxx. ...

随机推荐

  1. .NET6中的await原理浅析

    前言 看过不少关于 await 的原理的文章,也知道背后是编译器给转成了状态机实现的,但是具体是怎么完成的,回调又是如何衔接的,一直都没有搞清楚,这次下定决心把源码自己跑了下,终于豁然开朗了 本文的演 ...

  2. 代码安全之代码混淆及加固(Android)🔒

    ​ 代码安全之代码混淆及加固(Android) 目录 代码安全之代码混淆及加固(Android) 摘要 引言 正文 代码混淆 代码加固 总结 参考资料 摘要 本文将介绍如何通过代码混淆和加固来保护An ...

  3. [AI]人工智能早就可以拥有有大量的初级意识

    引子 意识是人类最基本而神秘的经验之一.在探索意识的本质时,我们需要建立清晰的概念分类体系,以免将它混同于其他概念而无法深入研究. 本文旨在阐述人类意识可能包含的两个层面:初级意识和高级意识,并明确区 ...

  4. STM32外设:定时器TIM

    主要外设: TIM:Timer 定时器 TIM中的基本电路 定时器 计数器的基本功能 复位:计数器值=初值.产生一个输出脉冲.产生更新事件(UEV)脉冲.更新中断标志UIF=1 计数:计数器值递增或递 ...

  5. cocos2d-Js 各类碰撞检测

    这里总结一下点.圆.矩形之间的简单碰撞检测算法(矩形不包括旋转状态) 点和圆的碰撞检测: 1.计算点和圆心的距离 2.判断点与圆心的距离是否小于圆的半径 isCollision: function(p ...

  6. gho、wim、esd的区别

    本文介绍的仅仅是压缩格式上的区别,并不是一些个体错误理解的 "GHOST 镜像 = 带驱动的快速装机镜像",实际 ESD 格式和 WIM 格式,也一样是可以集成驱动做成二次封装的快 ...

  7. Selenium-[实例]猫眼电影爬取

    import random import time from selenium import webdriver from selenium.webdriver import ActionChains ...

  8. 聊聊流式数据湖Paimon(三)

    概述 如果表没有定义主键,则默认情况下它是仅追加 表类型(Append Only Table). 根据桶(Bucket)的定义,我们有两种不同的仅追加模式:"Append For Scala ...

  9. sudo: unable to execute /bin/rm: Argument list too long

    Linux,删除文件夹下所有内容,数据太多时,报错too long sudo rm -r /var/lib/jenkins/workspace/test_1/allure-report/data/at ...

  10. Mysql索引失效的几种原因-mysql-suo-yin-shi-xiao-de-ji-zhong-yuan-yin

    title: Mysql索引失效的几种原因 date: 2021-07-15 17:13:59.019 updated: 2021-12-26 17:43:12.489 url: https://ww ...