title: Zuul routing : One endpoint with multiple microservices
body: <p>I would like to setup zuul and the underlying microservices in a way that all services will be under the '/gateway' context.</p>
  
  <p>For example:</p>
  
  <p>Microservice 1 has : <a href="http://localhost:8081/api/hello" rel="nofollow noreferrer">http://localhost:8081/api/hello</a></p>
  
  <p>Microservice 2 has : <a href="http://localhost:8082/api/bye" rel="nofollow noreferrer">http://localhost:8082/api/bye</a></p>
  
  <p>I would want to be able to access the microservices via zuul as follows:</p>
  
  <p>Microservice 1 : <a href="http://localhost:8080/" rel="nofollow noreferrer">http://localhost:8080/</a><strong>gateway</strong>/microservice1/api/hello</p>
  
  <p>Microservice 2: <a href="http://localhost:8080/" rel="nofollow noreferrer">http://localhost:8080/</a><strong>gateway</strong>/microservice2/api/bye</p>
  
  <p>I have tried to set this up, although it seems the requests are not getting routed correctly.</p>
  
  <p>The reason I would like the front end to route all client side REST calls to server that begin with '/gateway' is that it provides simpler maintenance to the front end.</p>
  
  <p>My application.yml:</p>
  
  <pre><code>zuul:
   prefix: /gateway
     routes:
       microservice1:
          path: /microservice1/**
          serviceId: microservice1
          strip-prefix: true
       microservice2:
          path: /microservice2/**
          serviceId: microservice2
          strip-prefix: true
  </code></pre>
  
  <p>Thank you </p>