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

devtools/2024/9/23 0:01:04/

报错内容

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/devtools/23131.html

相关文章

NDK 入门(二)—— 调音小项目

NDK 入门系列主要介绍 JNI 的相关内容,目录如下: NDK 入门(一)—— JNI 初探 NDK 入门(二)—— 调音小项目 NDK 入门(三)—— JNI 注册与 JNI 线程 NDK 入门(四&#xff…

WPF2022终结版系列课程笔记 1 WPF 基本布局

本笔记为B站 微软系列技术教程 WPF项目实战合集(2022终结版) 项目记录 WPF 基本布局 WPF布局原则 一个窗口中只能包含一个元素 不应显示设置元素尺寸 不应使用坐标设置元素的位置 可以嵌套布局容器 WPF布局容器 StackPanel: 水平或垂直排列元素、Orientation属性分别: Hor…

挑战一周完成Vue3项目Day2:路由配置+登录模块+layout组件+路由鉴权

一、路由配置 经过分析,项目一共需要4个一级路由:登录(login)、主页(home)、404、任意路由(重定向到404)。 1、安装路由插件 pnpm install vue-router 2、创建路由组件 在src目…

【AIGC】探索大语言模型中的词元化技术机器应用实例

科技前沿:探索大语言模型中的词元化技术及其应用实例 一、词元化技术的原理与重要性二、词元化技术的应用实例与代码展示三、词元化技术在科技热点中的应用四、总结与展望 随着人工智能技术的迅猛发展,自然语言处理领域也取得了长足的进步。其中&#xf…

unity游戏

unity游戏 unity游戏逆向主要可以分成两类,dll游戏和libil2cpp游戏,也有apk的。一般为c#编写 一般用dnspy反编译data文件夹中的Assembly-CSharp D:\ctf附件\attachment\BJD hamburger competition_Data\Managed [BJDCTF2020]BJD hamburger competitio…

Spring Security OAuth2 统一登录

介绍 Spring Security OAuth2 是一个在 Spring Security 框架基础上构建的 OAuth2 授权服务器和资源服务器的扩展库。它提供了一套功能强大的工具和组件,用于实现 OAuth2 协议中的授权流程、令牌管理和访问控制。 Git地址:yunfeng-boot3-sercurity: Sp…

【Kotlin】select简介

1 前言 协程的 select 是一种用于异步操作的选择器,它允许同时等待多个挂起函数的结果,并在其中一个完成时执行相应的操作。 能够被 select 的事件都是 SelectClause,在 select.kt 中有定义,如下。 public interface SelectBuild…

Android 音视频基础知识

本系列文章会介绍两个 Android NDK Demo,拉流端会实现一个基于 FFmpeg 的视频播放器 Demo,推流端会实现一个视频直播 Demo,当然在做 Demo 之前会介绍音视频的基础知识。以下是本系列文章的目录: Android 音视频基础知识 Android 音…