Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
How To Create A Spring Boot Project?
3.
Creating A Spring Boot Project Using Spring Tool Suite
3.1.
Installing Spring Tool Suite (STS) 
3.2.
Project Creation Steps
4.
Spring Tool Suite Features
5.
Frequently Asked Questions
5.1.
What is difference between Spring Tool Suite and Eclipse?
5.2.
What are the benefits of using Spring Tool Suite?
5.3.
What is the difference between Spring Tool Suite and Spring Boot?
5.4.
What is latest version of STS?
6.
Conclusion
Last Updated: Apr 2, 2024
Medium

What is Spring Tool Suite (STS)

Author Vivek Tiwari
0 upvote
gp-icon
Basics of Javascript
Free guided path
10 chapters
68+ problems
gp-badge
Earn badges and level up

Introduction

Spring Boot is an open-source Java-based framework used to spring boot-microservices. It is used to create stand-alone and production-ready spring applications. It provides an easier and faster way to set up, configure, and run simple and complex web-based applications. Spring Tool Suite (STS) is an IDE popularly known as STS IDE used to create a Spring Boot project.

Spring Tool Suite

Let’s now understand different ways of creating a Spring Project.

Spring Tool Suite (STS) is an Integrated Development Environment (IDE) based on Eclipse and specifically designed for developing Spring Framework-based applications. It provides a comprehensive set of tools that simplify the development, deployment, and management of Spring applications. STS includes code completion, integrated debugging, and visual editing of Spring configuration files. It also supports other technologies, including Groovy, Gradle, and Maven. STS is widely used by Spring developers and is available as a free download from the Spring website.

How To Create A Spring Boot Project?

There are four basic ways to create a Spring Boot project:

  1. Create a Maven project and add starter dependencies.
  2. Using Spring Initializr.
  3. Using Spring Tool Suite(STS) IDE.
  4. Using Spring Boot command-line interface.

One of the easiest and fastest ways to start a spring boot project is using STS IDE.

Let’s now understand how to create a spring boot project using STS.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Creating A Spring Boot Project Using Spring Tool Suite

Let’s understand how to create a spring boot project using STS IDE.

We have divided the whole project creation process into two Parts. The first part will cover the Installation of the STS IDE, and the second part will cover the project creation steps.

Installing Spring Tool Suite (STS) 

Step 1: 

First, we must install STS IDE in our local environment. You can install the STS for different OS and text editors using the link below.

Visit: https://spring.io/tools.

This tutorial will use STS for eclipse and Linux Operating Systems. The process will be the same for Windows and Mac users as well.

install STS IDE

Step 2: 

After downloading the file for your respective OS. You need to extract that file from one of the folders. 

After extracting the file, you can see a new folder containing different files, like below.

downloading the file for your respective OS

Step 3: 

To start creating your project, open the executable file SpringToolSuite4 or SpringToolSuite4.exe.

This will open a new interface asking you about the workspace, like the one below.

SpringToolSuite4

You need to press the Launch button to open the workspace.

Step 4: 

After launching the workspace, you will see a workspace will open which looks exactly similar to the Eclipse workspace.

launching the workspace

Now, we have successfully installed the STS IDE and created a workspace. Let’s move on to the Project Creation Phase, i.e., Part 2.

Project Creation Steps

 

Step 1:  

Open the STS IDE.

Step 2:  

Click the File menu->New->Spring Starter Project. You will see a new interface, like the one below.

Open the STS IDE There is some information you need to fill in to create the project:

  1. Name: In this field, you have to specify the name of your project.
  2. Type: It defines the kind of project. In the dropdown, you will be given two choices to choose the project management tool you want. We can create either Maven Project or Gradle.
  3. Language: It provides the choice among three languages Java, Kotlin, and Groovy. Java is, by default, selected.
  4. Group: Group denotes the package name. By default is “com.example.demo”. We can change the group id to something else.
  5. Artifact: Artifact denotes the Application name. It is filled by default while filling the Name field. 
  6. Version: Mention the version of your application.
  7. Description: Put the description of the project here.
  8. Package: It is the same as the Group name.

 

We have filled all the required fields, like below.

STS Steps

Step 3: 

After filling in all the fields, you can now click on the Next button. You will see an interface like below, asking you to choose the dependencies you want to inject into your project.

New Spring Starter

You can choose different dependencies which you want to inject into your project. For example, if you build a web application, you can choose the Spring Web dependency. We have injected the Spring Web dependency into our project.

Step 4. 

After choosing the dependencies, click on the Next button. You will see an interface asking you for the base and full URLsYou can leave it as a default value and click the Finish button.

Step 5. 

After that, a new project is created, which you can see on the left side of your workspace, like below. 

Package Explorer

The main project folder (CodingNinjas here) contains many folders and files. Some Important Files and Folders are

  1. pom.xml: This file contains the information about our project & all the dependencies which we have currently injected.
  2. applications.properties:  This file resides inside the src/main/resources folder and is used to specify various project properties. For example, We can specify the port number on which our application runs.

 

Step 6: 

To run your application, you can go into the src/main/java->com.packagename->App.java 

In our case, it is: 

src/main/java->com.codingninjas->CodingNinjasApplication.java

CodingNinjasApplication

Step 7: 

Right-click on App.java (CodingNinjasApplication.java hereand Run as Spring Boot App. You can see your application is running on default port 8080, like below.

Spring Boot App

Now, we have successfully created our Spring Boot project using STS.

Spring Tool Suite Features

There are many features present in the Spring Tool Suit. Let us discuss them in brief.

  • The Spring tool suite is one of the best IDEs users can ever use to create spring boot apps. Spring Boot projects can be readily uploaded using the Boot dashboard functionality to any cloud foundry. 
     
  • For increased efficiency and simplicity of development, the Eclipse Market Place offers attractive plugins and tools. The STS marketplace makes it possible to add theme plugins.
     
  • Built-in browser support, heap status monitoring, code commit and push to GIT, use start.spring.io site to interact with and download a starter project, integration with sonarlint. This ensures code quality, multiline comments on a project, and multiline edits.

See also, spring mvc vs spring boot

Frequently Asked Questions

What is difference between Spring Tool Suite and Eclipse?

Spring Tool Suite (STS) is a customized distribution of Eclipse IDE tailored for Spring framework development. While Eclipse is a versatile IDE supporting multiple languages and frameworks, STS comes pre-configured with Spring-specific tools, templates, and features to streamline Spring application development.

What are the benefits of using Spring Tool Suite?

The benefits of using STS are that it is pre-configured for Spring, it enhances productivity, and seamless integration.

What is the difference between Spring Tool Suite and Spring Boot?

No, Spring Boot and Spring Tool Suite are not the same. Spring Boot is a framework for building standalone applications, while Spring Tool Suite is an IDE for developing Spring-based applications. Spring Boot provides a set of pre-configured components and settings that make it easy to build Spring applications quickly. In contrast, Spring Tool Suite provides an environment for developers to write, test, and deploy Spring applications.

What is latest version of STS?

The latest version of Spring Tool Suite is 4.15.1. STS 4.15.1 refers to the Spring Tool Suite version 4.15.1, an integrated development environment (IDE) based on the Eclipse platform designed for developing Spring applications.

Conclusion

This article discusses the topic of Spring Tool Suite. In detail, we have seen the definition of Spring Tool Suite. Along with this, we have seen how to create a Spring Boot project. We hope this blog has helped you enhance your knowledge of Spring Tool Suite. If you want to learn more, then check out our articles. And many more on our platform Code360.

You can also consider our Spring Boot Course to give your career an edge over others.

Happy Learning!

Previous article
Spring Boot CLI
Next article
Spring Boot Annotations
Guided path
Free
gridgp-icon
Basics of Javascript
10 chapters
68+ Problems
gp-badge
Earn badges and level up
Live masterclass