Zuul routing confusion in spring microservices

By | July 16, 2018

I have to spring microservices and being ran on docker containers each connecting to my discovery service being ran on port :8080. I see them all getting register and when i try to access one of the services doing for exmaple: localhost:8080/api/microservice-service-A/ it doesn’t seem to route. But i can connect to them directly to their port number? Below is my application.yml file. I can’t directly put on the url the port number where microservice is running due to the fact its constantly changing every time i spin up the services. So basically i can’t access through my discovery service but i can individually on its respected ports its running on.

  prefix: /api
    microservice-service- A:
      path: /microservice-service-A/**
      url: http://microservice-service-A:8080
    microservice-service- B:
      path: /microservice-service-B/**
      url: http://microservice-service-B:8080

Leave a Reply

Your email address will not be published. Required fields are marked *