Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate multiple files based on file templates [duplicate]

Is it possible to add a script (run in IntelliJ) that adds multiple files based on the defined file templates?

Use Case:

I am working on an enterprise Java project that uses spring, hibernate, ..
For every Hibernate mapping, there are certain files that need to be created:

  • hibernate mapping with name [mappingName]
  • [mappingName]Repository
  • [mappingName]RepositoryImpl
  • [mappingName]Service
  • [mappingName]ServiceImpl
  • [mappingName]Controller
  • [mappingName]LinkBuilder
  • [mappingName]DTO
  • [mappingName]DTOMapper

I created file templates for all these files, but instead of creating every file manually, i would like to create them all in bulk.

It doesn't really matter which scripting language :-)

Is this possible?

Thanks in advance!

like image 381
KristofMols Avatar asked Mar 24 '26 13:03

KristofMols


1 Answers

How about this: Creating and Editing Multi-File Templates

like image 117
locohamster Avatar answered Mar 27 '26 04:03

locohamster



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!