简体   繁体   中英

Spring Eureka server does not find context-path in client url

When a client application is registered into Spring Eureka server the client id appears at dashboard, but the link url only contains the hostname and port without the context-path of client.

If I create the Spring Boot client application without setting a context-path, I mean default root context, Eureka server can access all actuators available in there.

Is there any way to inform Eureka server about it? I tried to set health and info properties, but it did not work.

If your Eureka client is setup via Spring's @EnableEurekaClient , then the client will default the health check and status check to /health and /info respectively. (These paths may be the default values beyond the Spring @EnableEurekaClient setup, but I am unfamiliar with those at this point in time).

You can override these defaults by setting the following properties:

eureka.instance.statusPageUrlPath

eureka.instance.healthCheckUrlPath

The Spring Cloud Documentation contains this information, plus much more.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM