Creating Spring Boot Project Using STS (original) (raw)

Last Updated : 23 Jul, 2025

Spring Boot is one of the favorite items of Spring Framework, as it requires very minimal configuration, unlike Spring MVC. Spring Boot applications are easily configurable and have several other benefits to use for developing stand-alone Java applications. Spring Boot comes with,

Spring Tool Suite

Spring tool suite is an eclipse-based IDE built to develop Spring-framework applications.

Spring Tool Suite

Creating Spring Boot Project

If you haven't installed the Spring tool suite, you can check here, how to install sts in your system.

**Step 1: Once sts is ready in your system, click on the executable (_.exe) file and it will open a prompt to select project location.

Creating a Workspace in STS

**Step 2: You can leave this directory as it is or can change it accordingly. Click on OK and the Spring tool suite's home screen will open.

Workspace view

**Step 3: On the left side, click on **file -> **new -> **spring starter project.

Directory Structure

**Step 4: A new window will open now, asking details for about your project

Maven bootstrap window

Description for each options shown in the above image is as follows-

  1. Let the service URL be the same as _start.spring.io.
  2. Name your project anything you want to.
  3. Choose the type as _maven
  4. Packaging as _jar.
  5. Java version will be available based on the JDK installed on your device.
  6. Name group as com._
  7. The default version will be _'0.0.1'
  8. You can write your project description according to your project.

**Step 5: Once these things are done, click on _Next.

Dependency Bootstrap

**Step 6: You can leave the spring boot version as it is. Use the search box given to search for dependencies to add to the project as per your need. for the time being you can search '_web' and select '_Spring web' and '_Spring web services'.

Let's say you want to perform any database operation in the project then you can go ahead and search for '_SQL' and select '_Spring data JPA' and '_MySql driver'. However, you can also add dependencies later using the Maven repository.

**Note: Don't add the JPA, MySQL dependencies if you don't have MySQL configured in your system.

**Step 7: Once you are done click on _Finish.

Url config for spring boot project

**Step 8: Now click on finish and wait till Spring boot configures all your dependencies. Now it completely depends on your device and internet speed and how much time it will take to finish the build. You can see the progress at the bottom of the window.

Package in workspace

**Step 9: Once it has completed the build, go ahead and check out your project.

GFG Application

**Note: You can see the @SpringBootApplication annotation in the Gfg__Application.java file denoting it as a Spring Boot Application. you can change dependencies by going to the **pom.xml file and adding dependencies manually from mvn repository.

**Step 10: Now, right-click on the blank portion and select _run as, you should get an option of _Spring Boot App, select that.

Run instruction for Project

**Step 11: Allow the Windows security prompt (if pops up).

Windows firewall allow.png)

**Step 12: Now wait for the deployment on the local host, you will be able to see the port number, on which the application is running. (for most cases it is _8080).

Console Log

**Step 13: It's showing Tomcat started on port _8080, which means your application is running locally on port no _8080. Now head over to your web browser and go to __http://localhost:8080/_to check it.

Application Up

If you can see this **Whitelabel error page that means your spring application is successfully running. As there is no controller configured for routing and no views exist that's why this page is showing up. Now can add your controllers and views as per your requirements and run your application.