【发布时间】:2017-11-02 04:46:59
【问题描述】:
spring cloud eureka问题:有3个微服务,1个eureka server,2个eureka client;
微服务A、B使用注解
@EnableEurekaClient;微服务 A 有一个 RESTful api“http://localhost:8080/hi”。 api 返回“你好”。
现在,我调用 api ,使用 url "http://client/hi",但它不起作用。
spring cloud eureka如何使用应用名称替换ip:port?
bootstrap.yml 内容:
spring:
application:
name: client
eureka:
client:
service-url:
defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/
【问题讨论】:
标签: spring-cloud netflix-eureka spring-cloud-netflix