这两天使用网上的教程进行Eureka注册中心的搭建, 各种启动不了, 网上各种查找资料, 最后解决方案为:
- 将jdk版本由15更改回8
- 在依赖中新增gson依赖
- 最后解决问题
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
</dependencies>