[英]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. 当客户端应用程序注册到Spring Eureka服务器中时,客户端ID出现在仪表板上,但是链接URL仅包含主机名和端口,而没有客户端的上下文路径。
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. 如果我创建Spring Boot客户端应用程序时未设置上下文路径,则表示默认的根上下文,Eureka服务器可以访问其中的所有可用执行器。
Is there any way to inform Eureka server about it? 有什么办法可以通知Eureka服务器吗? 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. 如果您的Eureka客户端是通过Spring的
@EnableEurekaClient
设置的,则客户端会将运行状况检查和状态检查分别默认为/health
和/info
。 (These paths may be the default values beyond the Spring @EnableEurekaClient
setup, but I am unfamiliar with those at this point in time). (这些路径可能是Spring
@EnableEurekaClient
设置以外的默认值,但目前我不熟悉这些路径)。
You can override these defaults by setting the following properties: 您可以通过设置以下属性来覆盖这些默认值:
eureka.instance.statusPageUrlPath
eureka.instance.statusPageUrlPath
eureka.instance.healthCheckUrlPath
eureka.instance.healthCheckUrlPath
The Spring Cloud Documentation contains this information, plus much more. Spring Cloud文档包含此信息以及更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.