0

Is there ant standard tool that generates the recommended Spring Boot project directory structure along with interfaces and implementation (Impl.java) classes and having gradle as build tool ?

  • maven have archetypes. You can try to find one that do the job. I personally was unable to do it, but maybe you lucky. https://maven.apache.org/guides/introduction/introduction-to-archetypes.html – talex Aug 21 '21 at 14:17
  • 2
    You can generate a minimal Spring Boot project with a customized set of additional dependencies here: https://start.spring.io You can choose between Maven and Gradle, different Java version, etc. – Benjamin M Aug 21 '21 at 14:20

1 Answers1

2

Check out the generator here https://start.spring.io You can choose if you want Gradle, choose the java version, and additional dependencies to be added.

It might be the best starter for a project.

Marek Żylicz
  • 429
  • 3
  • 8
  • Right, but we cannot create directory structure there, such as controller, service, dao etc etc – AdityaKapreShrewsburyBoston Aug 21 '21 at 20:46
  • 2
    The [recommended directory structure](https://docs.spring.io/spring-boot/docs/2.4.x/reference/htmlsingle/#using-boot-locating-the-main-class) is to package code by feature. Rather than having a directory of controllers, a directory of DAOs, etc, you have a directory for feature A, a directory for feature B, etc. These broad features are specific to your app so the directories cannot be generated. – Andy Wilkinson Aug 22 '21 at 07:22
  • 1
    You will probably not find anything better than this starter. If you don't like the recommended directory structure you can generate the project using starter anyway, and create the directory structure you need, later, manually. – Marek Żylicz Aug 22 '21 at 18:56