Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reuse .java entities with JHipster?

Tags:

java

jpa

jhipster

I have a quantity of (commented) JPA entities as .java files that I want to reuse with a brand new JHipster generated project. They are documented so I dont want to regenerate them.

So far, from exchanging on the chat, an option would be to use JHipster-UML. Meaning I must use my javas to produce a valid XMI file then used by JHipster-UML to produce JSON describing the entities. Then the JSON is to be used by JHipster.

The first option I thought of was to generate text to be fed to JHipster (with << on unices)

Is there something cooking for that usage (say ".java import") ?

What is advised as of today ?

Thank you

like image 516
Jerome_B Avatar asked Dec 14 '25 18:12

Jerome_B


1 Answers

The problem with converting java entity files to json, is that only certain entity options are supported by jhipster. So, it's not the conversion that's difficult, it's adding the support for the options to the generators.

I use JDL, which isn't automatic but is still fairly simple to create existing entities and relationships.

like image 199
elk-tamer Avatar answered Dec 17 '25 07:12

elk-tamer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!