The Spring Tool Suite (STS) is a powerful tool for developers working with the Spring framework. With Spring Boot, there is no exception. In support of Spring Boot, STS has integrated with Spring Initializr which makes it easy to get started with Spring Boot. In this tutorial, I will guide you all on how to create a new Spring Boot project using Spring Tool Suite.
First, start up your STS, then go to File, select New then Spring Starter Project. A New Spring Starter Project window will appear.
In this window, as you can see, there is a lot of information we need to enter.
The first information is the Service URL. By default, the value will be http://start.spring.io. This is the Spring Initializr URL, that helps Spring Tool Suite can get all the needed information for creating the Spring Boot project. Let’s leave it with the default value.
The Project Name field is your project name. You can choose your project type Maven or Gradle in Type, select Packaging as JAR file or WAR file, and choose the Java version to use.
The rest is the necessary information of Maven or Gradle project including Group Id, Artifact Id, Version, Description and Package.
You can enter values as you like, here I entered these values as follows:
After finishing, let click the Next button to continue.
A Dependency window will appear.
Like creating a Spring Boot project using the Spring Initializr Web, enter the dependency name you want to add to your project, and STS will suggest it to you.
For example, here, I need dependency for the Web, I will enter the Available box as follows:
Dependency for the Web will appear, you just need to mark it.
Here, for example, I choose the following dependencies:
After you have selected the dependencies, let click the Next button to continue.
As you can see, above is the URL of Spring Initializr for the web, STS will call this URL for Spring Initializr to create the Spring Boot project for us.
Click the Finish button to finish creating a new Spring Boot project in your STS.