Setup a Spring Boot Project using Spring Initializr Setup a Spring Boot Project using Spring Initializr

Page content

In this article, we’ll learn how to create a Spring Boot project quickly from scratch use Spring Initializer.

Spring Initializr

It is highly recommended to use Spring Initializr for the initial setup of your Spring Boot Project. Some of the advantage of Spring Initializer:-

  1. It is the quickest way to setup a project by selecting project build, language, spring boot version, project metadata, and required dependencies.

  2. You will always be working on the latest stable spring boot version, the latest stable version is selected by default.

  3. Auto generates pom.xml or build.gradle for you based on your selections.

  4. You can use SHARE button to generate a URL for your selected configuration, e.g.

    https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.3.0.RELEASE&packaging=jar&jvmVersion=1.8&groupId=com.example&artifactId=api&name=api&description=Build%20RESTFul%20API%20using%20Spring%20Boot&packageName=com.example.api&dependencies=web

    The above URL will show following configuration pre-selected in Spring Initialzr

    Example of Spring Boot RESTFul API Project

    Example of Spring Boot RESTFul API Project

  5. You can quickly review the project using EXPLORE before generating a project.

  6. You can GENERATE the project. It will download a .zip file, which you can extract and import in Spring STS, Eclipse, or IntelliJ IDE

    Downloaded api.zip and its extracted files

    Downloaded api.zip and its extracted files

    Imported Spring Boot Project in Eclipse

    Imported Spring Boot Project in Eclipse

That’s it. I hope this will encourage you to build a project using Spring Initalizr

Spring Initializr for Eclipse IDE

If you use Eclipse IDE for Java development then you can install plugin Spring Tool for Eclipse IDE which is very useful to quickly create a Spring Boot project within Eclipse using Spring Initializr.

Read How to setup Spring Tool for Eclipse IDE and create Spring Boot Project