springcloud zuul 总结

hello-service 是一个服务名称,test01是该服务下面的一个接口。

配置网关的时候:

zuul:
  routes:
#自定义(建议和服务名称一致)
    hello-service:
      path: /hello-service/**
      serviceId: hello-service

等同于什么都不配置,即删除上面 zuul 配置!

访问路径:http://xxx.8080/hello-service/test01

没有配置的时候,在访问路径上面加上hello-service,默认走该服务下面的所有方法,配置了,则按照path访问。 

发布了23 篇原创文章 · 获赞 3 · 访问量 6858

猜你喜欢

转载自blog.csdn.net/weixin_41834814/article/details/85051377