Eureka无法注册的错误:Saw local status change event StatusChangeEvent

原来添加依赖使用如下:

dependencies {
    
    compile("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.4.RELEASE")


}

启动时,会提示错误:[ WARN ] [2020-08-18 14:45:15.922][main]  com.netflix.discovery.DiscoveryClient [1297] - Saw local status change event StatusChangeEvent [timestamp=1597733115922, current=DOWN, previous=UP]

后来发现是服务名称的写法问题:

添加依赖如下:

dependencies {
    
    compile("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.4.RELEASE")

    compile("org.apache.commons:commons-lang3:3.8.1")
}

可以正常注册服务到Eureka.

猜你喜欢

转载自blog.csdn.net/zzy7075/article/details/108076953