Home > Blockchain >  What is the archetype to use to build a SpringBoot project?
What is the archetype to use to build a SpringBoot project?

Time:02-06

For years, I've used Spring Initializr (at https://start.spring.io/) to create the initial SpringBoot application and then modify it to create the app. This works fine.

Is there a maven archetype I can use to create a SpringBoot app? Or is the Spring Initializr the only way to do this.

Searching I found this:

Which shows the command:

mvn archetype:generate -Dfilter=org.apache.maven.archetypes:

Which gives me a list of 14 items to choose from. None of them mention SpringBoot. The closest match is org.apache.maven.archetypes:maven-archetype-webapp, so I tried it and it created a WebApp (*.war) which is not what I'm looking for.

CodePudding user response:

The aim of the Maven archetype is for generating a project skeleton. The Spring Initialiser also does the same but I think you should find it more user friendly to use when compared to executing a maven archetype command.

If you insist to use maven archetype , you can simply search Github to see if there are people share their archetypes (search result at here)

If your aim is just to use command to generate a spring-boot project skeleton , Spring Initializr actually provide an HTTP API to do it.

Also you can checkout JHipster, which is another tool to generate a spring-boot project skeleton.

  •  Tags:  
  • Related