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. Verilog HDL数据流建模与运算符

    数据流建模使用的连续赋值语句由关键词assign开始,一般用法如下: wire [位宽说明]变量名1, 变量名2, ..., 变量名n; assign 变量名 = 表达式; 只要等号右边的值发生变化, ...

  2. MySQL概述安装

    一,数据库概述 1.为什么要使用数据库 将数据持久化. 持久化主要作用:是将内存中的数据库存储在关系型数据库中,本质也就是存储在磁盘文件中. 数据库在横向上的存储数据的条数,以及在纵向上存储数据的丰富 ...

  3. 这些新项目一定不要错过「GitHub 热点速览」

    本周 GitHub 热点上榜的项目有不少的新面孔,比如搞电子商务的 eShop,还有处理表数据的 onetable.还有用来方便处理数据同步问题的 loro,以及网易新开源的 tts 项目 Emoti ...

  4. 升级到 Pulsar3.0 后深入了解 JWT 鉴权

    背景 最近在测试将 Pulsar 2.11.2 升级到 3.0.1的过程中碰到一个鉴权问题,正好借着这个问题充分了解下 Pulsar 的鉴权机制是如何运转的. Pulsar 支持 Namespace/ ...

  5. 新来个架构师,把Xxl-Job原理讲的炉火纯青

    大家好,我是三友~~ 今天来继续探秘系列,扒一扒轻量级的分布式任务调度平台Xxl-Job背后的架构原理 公众号:三友的java日记 核心概念 这里还是老样子,为了保证文章的完整性和连贯性,方便那些没有 ...

  6. 【I/O设备】显示设备 Display

    显示设备 电信号→视觉信号 属于软复制输出设备:输出内容不能长期保存 显示内容分为:字符.图形.图像 按显示器件分类:CRT.LCD.OLED等 (PD.LED.ELD.ECD.EPID) 按显示原理 ...

  7. kotlin+springboot入门级别教程,教你如何用kotlin和springboot搭建http

    先打开idea,或者用springboot官网.阿里云那边都行 然后点击新建项目,spring Initializr,我们都知道,springboot是支持kotlin的,除非你是kotlin1.3之 ...

  8. 如何判断lib和dll是32位还是64位?答案是使用微软的dumpbin工具,后面讲了如何使用gcc生成lib和dll

    为什么我会考虑这个问题呢?因为我在使用java去调用一个c的lib库的时候,弹出以下警告: D:\work\ideaworkpaces\jdk21Test001\src\main\java\lib\h ...

  9. 8 HTTP 的请求方法

    目录 标准请求方法 GET/HEAD GET 方法 HEAD方法 POST/PUT POST PUT 非常用方法 DELETE 方法 CONNECT 方法 OPTIONS 方法 TRACE 方法 拓展 ...

  10. python tkinter 使用(十)

    python tkinter 使用(十) #!/usr/bin/python3 # -*- coding: UTF-8 -*- """ @Author: zh @Time ...