Spring云应用程序中的尤里卡ID和服务ID之间的区别?

时间:2015-08-27 00:13:19

标签: spring spring-boot spring-cloud

我正在阅读关于启用ZuulProxy for spring cloud应用程序的documentation

它从以下开始:

By convention, a service with the Eureka ID "users", will receive requests from the proxy located at /users

然后在文档中,它如下所示

To get more fine-grained control over a route you can specify the path and the serviceId independently:

application.yml
 zuul:
  routes:
    users:
      path: /myusers/**
      serviceId: users_service
This means that http calls to "/myusers" get forwarded to the "users_service" service. The route has to have a "path" which can be specified as an ant-style pattern, so "/myusers/*" only matches one level, but "/myusers/**" matches hierarchically.

此处引用serviceID。我现在很困惑?上述users中的users_serviceapplication.yml是什么。

据我所知,每个微服务应用程序向Eureka注册都会在bootstrap.yml中提供以下名称:例如,

spring:
  application:
    name: user

我的理解是user现在是Eureka ID以及服务ID。那么上面的usersusers_service是什么意思?

0 个答案:

没有答案