Zuul not forwarding requests to other micro-services

梦想与她 提交于 2019-12-06 15:35:44

As I can see, you set up Eureka but you're not using it correctly. First in zuul yaml you have

eureka:
  client:
    registerWithEureka: true

you don't need to register your zuul application with eureka, because you are accessing zuul gateway directly, no one service will try to locate and reach your gateway.

Than

account:
  serviceId: ACCOUNT
  url: http://192.168.0.62:8081/
  stripPrefix: false
  predicate:
  - Path=/accounts/**

if you have service discovery you don't need url property and predicate: - Path, try:

account:
  serviceId: <YOUR_ACCOUNT_SERVICE_ID>
  stripPrefix: false
  path: /account/**

by default serviceId is:

spring:
  application:
    name: <YOUR_ACCOUNT_SERVICE_ID>

check my answer from here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!