springcloud启动The bean ‘eurekaRegistration‘, defined in class path resource报错

Bertha 。 2023-02-27 13:45 119阅读 0赞
  1. Description:
  2. The bean 'eurekaRegistration', defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$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$RefreshableEurekaClientConfiguration.class] and overriding is disabled.
  3. Action:
  4. Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
  5. Process finished with exit code 1

原因 错误依赖

  1. <dependency>
  2. <groupId>org.springframework.cloud</groupId>
  3. <artifactId>spring-cloud-netflix-eureka-server</artifactId>
  4. </dependency>

修改为

  1. <dependency>
  2. <groupId>org.springframework.cloud</groupId>
  3. <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
  4. </dependency>

发表评论

表情:
评论列表 (有 0 条评论,119人围观)

还没有评论,来说两句吧...

相关阅读