【发布时间】:2017-05-02 11:15:59
【问题描述】:
我对 Netflix 云微服务架构还很陌生。
我的网络中运行着三个微服务:
-
Zuul/Ribbon 服务:localhost:8765
Application.yml: =============== eureka: client: serviceUrl: defaultZone: http://localhost:8761/eureka/ 尤里卡服务:localhost:8761
- 租车服务:本地主机:8888
现在,我的请求是:localhost:8765/RentCarService/getAllAvailableCars
此请求应自动转发到正确的微服务(端口为 8888 的 RentCarService),例如 localhost:8888/getAllAvailableCars
我看过很多教程,其中大部分都是像本教程一样以编程方式转发请求:
Microservice discovery with spring boot and eureka
Or here by a method called getServiceURL
我必须自己编码转发还是功能区可以自动编码?
最好的问候 拉尔斯
【问题讨论】:
标签: java spring-boot microservices netflix-zuul netflix-eureka