今天用Eureka-Client无法注册到Eureka-Server,启动后自动停止,主要错误信息:
Unregistering application product with eureka with status DOWN
首先检查配置文件
spring:
application:
name: product
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka/
没发现错误,后来经查,是没有引入web模块,导致的,吐血中...
引入web模块
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Maven->Reimport后,再启动,问题解决!