[踩坑日记]Eureka启动失败

 

 这是包冲突问题。降低spring版本或者提升springframework.cloud版本

我的配置:

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.2.RELEASE</version>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
<version>2.2.3.RELEASE</version>
</dependency>

——————————————————————————————
注意!!!
spring-cloud-starter-eureka包只更新到1.4.7,
后续版本改为
spring-cloud-starter-eureka
———————————————————————————————
包版本冲突解决后,出现配置问题:

 

 

 1 server:
 2   port: 8761
 3 eureka:
 4   instance:
 5     hostname: localhost
 6   client:
 7     register-with-eureka: false
 8     service-url:
 9      defaultZone: http://localhost:8761/eureka/
10 
11   server:
12     enable-self-preservation: false

第九行加一个空格!!

解决:

 

 




posted @ 2020-07-28 18:13  vince_z  阅读(909)  评论(0编辑  收藏  举报