Our "jhipster entity" sub-generator generates a complete CRUD entity: that's good for a lot of reasons, but sometimes you just want to create a simple REST service. Not everything is a CRUD :-)
If you want smaller components:
I would like to:
This would be an easy work, which shouldn't have much impact elsewhere, but which could help a lot of people.
Could be a good thing for hacktoberfest
@jdubois how about containing everything in a parent sub gen (Of course code wise each will be separate and we will just compose it from the parent) so that users don't have to remember every sub generator and it will be easier to advertise and drive adoption.
I propose jhipster component which will ask the below question
What would you like to do?
1. Generate an entity
2. Generate a Spring service
3. Generate a Spring controller
Based on the answer we will just compose the appropriate sub gen and it will take it from there asking additional questions if any and generating the stuff
Advantages of this
Generate a Spring controller with service for which we will just compose the controller sub gen followed by the service sub gen@deepu105 Yes but that's just another sub-generator which is a "wrapper" of the others - no big deal here!
For my personal use-case, I'd rather have "jhipster spring-controller", I find it easier and quicker to use (and that would still be possible, so no problem).
I like the idea, this is similar to what Grails has and offers a good level of granularity of what will be generated. It happened to me to delete all the UI part for a given entity because it was not needed.
I would prefer a different command than answering questions like @jdubois mentioned.
Yes: at the beginning Grails (and RoR!!) where heavy sources of inspiration, we are going back to roots :-)
Hi @jdubois I am interested in this feature !!!
Closing as we have a "spring-controller" sub-generator that was commited in the last release.
Most helpful comment
@jdubois how about containing everything in a parent sub gen (Of course code wise each will be separate and we will just compose it from the parent) so that users don't have to remember every sub generator and it will be easier to advertise and drive adoption.
I propose
jhipster componentwhich will ask the below questionBased on the answer we will just compose the appropriate sub gen and it will take it from there asking additional questions if any and generating the stuff
Advantages of this
Generate a Spring controller with servicefor which we will just compose the controller sub gen followed by the service sub gen