0

I want to generate an app with a package structure and project directories that I have determined in Jhipster. Can I generate the application according to a package structure that I have determined in Jhipster?

For example I want to packages' names as:

xx.com.xx. project name. inner project name. service or library name

And for example I want to generate the spring project files as this package structure:

-api
   -rest
   -kafka
-service
   -dto
      -mapper
-repository
   -entity

...

If I can, how can I do it, can you give a short example? I'm pretty new to this, I hope I explained what I wanted to say.

2
  • 2
    Can you please update your question to include what you'd like to do vs what JHipster does? Feb 23 at 13:58
  • I edited my question I hope I could explained what I wanted to. Feb 24 at 5:39

1 Answer 1

0

You should be able to use @EntityPackage in your JDL to modify where entity files are put when you generate them. Example JDL:

https://github.com/jhipster/generator-jhipster/blob/main/test-integration/samples/jdl-entities/custom-domain.jdl#L2

2
  • Thank you response, but I want to create a package structure for all related classes for example dto, repository etc. That solution does not effect this related classes. For example I want a structure like the mapper package under the dto package, but the default package structure both dto, and mapper packages under the service package. How can I solve this problem? Mar 3 at 7:57
  • The easiest way is probably to use your IDE to refactor things after you generate the classes. The hardest way is to create a new blueprint that overrides the backend and puts files where you want them. Mar 3 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.