[英]Query eureka without registering as a service
I'm building a service X that will use eureka. 我正在构建将使用尤里卡的服务X。 I use spring boot and spring cloud.
我使用弹簧靴和弹簧云。 I want to check if i configured X correctly (load balancing, service discovery etc).
我想检查我是否正确配置了X(负载平衡,服务发现等)。 to do it i would like to run X locally and connect/query existing eureka (on company's UAT environment) but without registering X as a new service so no traffic is redirected to my local machine.
为此,我想在本地运行X并连接/查询现有的eureka(在公司的UAT环境中),但没有将X注册为新服务,因此没有流量重定向到我的本地计算机。
is it possible? 可能吗? what configuration is needed to achieve it?
要实现它需要什么配置?
With this property it works for me: 有了这个属性,它对我有用:
eureka.client.register-with-eureka=false
But I also found an example in the eureka documentation: https://github.com/Netflix/eureka/blob/master/eureka-examples/conf/sample-eureka-client.properties 但我还在eureka文档中找到了一个示例: https : //github.com/Netflix/eureka/blob/master/eureka-examples/conf/sample-eureka-client.properties
note that for a purely client usage (eg only used to get information about other services, there is no need for registration. [...]
请注意,仅用于客户端用途(例如,仅用于获取有关其他服务的信息,因此无需注册。[...]
eureka.registration.enabled=false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.