In order to learn the awesome JHipster framework I'm trying to implement a simple jhipster microservice architecture in order to have the gateway REST request the microservice and the microservice request the database.
Firstly, I generate a microservice application (backend port 8081), a microservice gateway (frontend port 8080) and clone the jhipster registry. Secondly, I import the same jdl in both microservice and gateway. I've implemented an AppLoading component to populate the database in the backend.
I've already tried to :
My code is available on github:
I launch all of them (with mvnw command) and all seems ok:
But, no backend data are available in the gateway. The gateway communicate with its owm h2 database port 8080 and doesn't REST request for the backend which owns my data!
My questions are :
I tried to give all the necessary information but ask me if something is missing.
Thanks a lot :-)
You need to specify the microservice
name in the JDL. Currently, you generated the entities in both the gateway and microservice. When you specify the microservice name, the gateway will only generate the frontend code. Here's an example:
entity A
entity B
microservice * with backend