【发布时间】:2016-11-02 10:01:34
【问题描述】:
我可以通过以下方式访问微服务吗: 尤里卡服务器:http://localhost:8761/ 微服务地址:http://localhost:8080/ 调用微服务类似于:http://localhost:8761/name-service/ 有可能吗? 当我打开尤里卡服务器时,服务已注册。
eureka/application.properties:
server.port=8761
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
logging.level.com.netflix.eureka=OFF
logging.level.com.netflix.discovery=OFF
name-service/application.properties
spring.application.name=name-service
server.port=8080
我怎样才能做到这一点?
【问题讨论】:
-
没有。 Eureka 是一个服务注册中心,而不是代理。如果我理解正确,你想要的是 Zuul:github.com/Netflix/zuul
标签: spring spring-boot microservices netflix-eureka