spring cloud eureka 初始化报错(A bean with that name has already been defined)

news/2024/9/22 18:39:32/

报错内容

The bean ‘eurekaRegistration’, defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration E u r e k a C l i e n t C o n f i g u r a t i o n . c l a s s ] , c o u l d n o t b e r e g i s t e r e d . A b e a n w i t h t h a t n a m e h a s a l r e a d y b e e n d e f i n e d i n c l a s s p a t h r e s o u r c e [ o r g / s p r i n g f r a m e w o r k / c l o u d / n e t f l i x / e u r e k a / E u r e k a C l i e n t A u t o C o n f i g u r a t i o n EurekaClientConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration EurekaClientConfiguration.class],couldnotberegistered.Abeanwiththatnamehasalreadybeendefinedinclasspathresource[org/springframework/cloud/netflix/eureka/EurekaClientAutoConfigurationRefreshableEurekaClientConfiguration.class] and overriding is disabled.

在这里插入图片描述

排查

原因大概就是依赖冲突、版本冲突之类的,根据以下答案尝试后没有修复:
https://stackoverflow.com/questions/62868281/bean-eurekaregistration-defined-in-class-path-resource-could-not-be-registere
https://developer.baidu.com/article/details/3234921
https://www.volcengine.com/theme/8366164-OTHER-7-1

最后发现引用了 spring-cloud-context,怀疑是版本冲突,去掉后问题修复。


http://www.ppmy.cn/news/1450044.html

相关文章

Django运行不提示网址问题

问题描述:运行django项目不提示网址信息,也就是web没有起来,无法访问。 (my-venv-3.8) PS D:\Project\MyGitCode\public\it_blog\blog> python .\manage.py runserver INFO autoreload 636 Watching for file changes with StatReloader …

【设计模式】16、state 状态模式

文章目录 十六、state 状态模式16.1 自动购物机16.1.1 vending_machine_test.go16.1.2 vending_maching.go16.1.3 state.go16.1.4 no_good_state.go16.1.5 has_good_state.go 16.2 player16.2.1 player_test.go16.2.2 player.go16.2.3 state.go16.2.4 stopped_state.go16.2.5 p…

React中的高阶组件

高阶组件 HOC 是 React 中用于复用组件逻辑的一种高级技巧。HOC 自身不是 React API 的一部分,它是一种基于 React 组合特性而形成的设计模式 参数为组件,返回值为新函数 const EnhanceComponent higherOrderComponent(WrappedComponent);组件将 pro…

hadoop学习---sqoop学习记录

在本地数据库创建数据库表: create database sqoop_test default character set utf8; use sqoop_test; CREATE TABLE emp ( EMPNO int(4) NOT NULL, ENAME varchar(10), JOB varchar(9), MGR int(4), HIREDATE date, SAL int(7), COMM int(7), DEPTNO int(2), PRI…

hive库基本语法

hive库基本语法 要善于套用别人的成功模式 别人的成功模式可成为一种指引 让你有方向可循 目录 hive库基本语法 1.创建数据库 2.查看数据库信息 3.通过指定的HDFS路径创建数据库 4. 创建数据库时增加配置信息 5.删除数据库 1.创建数据库 CREATE DATABASE IF NOT EXISTS …

IOT病毒分析

前言: 最近审计报警日志,发现了一个IOT病毒,利用的是CVE-2023-1389漏洞扫描tplink,进行攻击,有点意思,拿出来分析下。 发现: 查看流量日志,发现了一个有问题的访问: 访…

Spring Boot可以同时处理多少请求?

Spring Boot本身对并发请求的处理能力没有明确的限制。Spring Boot的并发处理能力通常受到以下因素影响: 服务器硬件:包括CPU核心数、内存大小等。JVM配置:堆内存、永久代或元空间大小等。Web服务器:Spring Boot 默认使用嵌入式的…

重构——改善既有代码的设计

目录 第一章:重构,第一个实例 第二章:重构的原则 第三章:代码坏味道 第四章:构筑测试体系 第五章:介绍重构名录 第六章:第一组重构 第七章:封装 第八章:搬移特性…