1
votes

I am using entity sub generator to generate entities in my jhipster gateway app by giving path of microservice app. but looks like I have to run sub generator for every entity in microservice . is there any way that it can read all the .json file and in micro service and generate all the entities ?

2

2 Answers

3
votes

I personally do as following :

  1. Copy repository ".jhipster" from the microservice repository into the Gateway repository
  2. Generate the gateway with the following command:

    yo jhipster --with-entities

1
votes

If you create your entities with jdl-studio you can specify microservices for them like in the doc.

microservice * with mysuperjhipsterapp except C
microservice C with myotherjhipsterapp

You can then generate the entitites with jhipster import-jdl my_file.jdl in both the gateway and the microservice.

You can skip entities from the gateway or the microservice by using this options in your jdl file:

skipClient for A
skipServer for B