Eureka failed to register error: saw local status change event statuschangeevent

The original usage of adding dependency is as follows:

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

}

When starting, an error will be prompted: [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]

 

Later, it was found that the problem was how to write the service name

Add the dependency as follows:

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

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

The service can be registered to Eureka

 

Read More: