Our JDL is ready to use now. The next step will be generating the entities in the gateway and the services. To start with, we will download our JDL files from the JDL studio. Once downloaded, we will move the files into our gateway and microservice applications respectively.
Once moved, run the following command after navigating into the gateway application folder. This will create the entities for the gateway and also create the UI for the microservice entities in the gateway:
> cd e-commerce-app/online-store
> jhipster import-jdl online-store.jh
> jhipster import-jdl ../notification/notification-jdl.jh --skip-ui-
grouping
> jhipster import-jdl ../invoice/invoice-jdl.jh --skip-ui-grouping
Run the following command for the notification service so that the backend for the entities are created there:
> cd e-commerce-app/notification
> jhipster import-jdl notification-jdl.jh
Run the following command for the invoice service so that the backends for the entities are created there:
> cd e-commerce-app/invoice
> jhipster import-jdl invoice-jdl.jh
JHipster will ask about overwriting the modified files; please select the applicable ones. We will use "a" ->, which means that it will overwrite everything.
Don't forget to cherry-pick any changes we made to entities originally in the monolith back to our gateway and microservices.
Don't forget to commit the changes in each of the services and gateway. You could also init the entire e-commerce-app folder as a git source if you like, by running git init:
> cd e-commerce-app
> git init
> git add --all
> git commit -am "entities generated using JDL"