Search code examples
jhipsternetflix-eurekanetflix-zuulgatewayspring-cloud-netflix

how to handle request from gateway to right microservice on jhipster registry?


we used microservice architecture of jhipster and generated three applications uaa, microservice, gateway. then run uaa and jhipster registry on a server, also we have some full stack developers who want to develop both gateway and microservice at the same time.

then, they deploy their microservice and gateway on jhipsterRegistery which is located on remote server. Because of the same name of microservices, jhipsterregistery can not handle requests from gateway to the right microservice

how to manage this problem?


Solution

  • We had the same problem and solved our issue by using a variable as a microservice application name. Then changed all rest URLs in gateway with this variable. So each developer just needs to change appname in application.yml in micro the same as the variable in app.constants.ts in the gateway as well.