我正在阅读关于启用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_service
和application.yml
是什么。
据我所知,每个微服务应用程序向Eureka注册都会在bootstrap.yml
中提供以下名称:例如,
spring:
application:
name: user
我的理解是user
现在是Eureka ID以及服务ID。那么上面的users
和users_service
是什么意思?