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.

1 Answers1

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

Matt Raible
  • 8,187
  • 9
  • 61
  • 120
  • 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? – Yardim Server Mar 03 '23 at 07: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. – Matt Raible Mar 03 '23 at 14:04