Creating Spring App Using STS

In this article, we will learn to create a spring application using Spring Tool Suit IDE.

Spring Tools suit is an official IDE provided by the Spring. You can use it to create Spring application with minimum effort. This IDE is similar to your favourite IDE whether it is Eclipse, IntelliJ IDEA, or others.

When you will visit the site(spring), you will see couple of versions of IDE for different the variety of developers. You can select and download any to your local machine.
To download this IDE, use this official link The site looks like this:

Select the IDE for your platform such as Linux or Windows and click on it. This will start downloading executable application. After downloading, click on the installer and it will start installing to your local system.

I’m attaching some screenshot for your convenience. You can get idea by following these.

This is the first screen you will see while running the executable.

After that, it asks for the location to install the IDE. Select the location for the application in your local system, it can by any folder or drive like C or D or others.

After that, click on the launch button and it will start opening the IDE. It shows a progress bar that represents the percentage of process is done. This will look like this:

After completing the process, the IDE will be opened. Since we chose the Eclipse version of the IDE, it looks similar to Eclipse now you can create spring application.

This IDE provides all the features of Eclipse so you can create maven project or dynamic project as well. Apart from this, it provides one more option spring started project to create a spring project. This is similar to the online spring initializer tool that asks for the dependencies too during the project creation.

Let’s start by selecting the spring started project from the File menu. So, select that and create a spring app.

Click File->New->Spring Starter Project

Now, fill the project details such as project name, project type (maven in our case), java version, packaging, programming language, and etc.

In the group name, provide the name in reverse domain and then artifact name. Then, click the next button.

Now, it asks for dependencies. Since we are creating a simple spring app that does not require any dependencies, we will skip this for now and click finish.

This step is similar to the spring initializer that asks for the dependencies while creating project. You can select dependencies like: Web, JSON, JPA, MySQL Connector, etc.

Click on the finish button and it will create a spring application that looks like this:

The IDE may take some time to build the project so just wait for couple of seconds if the project is not ready. You can see the process bar in the bottom of the IDE.

After completing, you can explore the project that has several default folders and files.

This project has two main files, pom.xml and The pom.xml file is an XML file that contains project configuration and list of dependencies. Similarly, the file contains java source code to execute the application. It contains a main() method as all Java project has and call to run() method to start the application.

We will explore this later in our next articles.

Initially, the code for java file looks like this:


package com.linuxhint.springapp;

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;


public class SpringappApplication {

    public static void main(String[] args) {, args);



The pom.xml file looks like this:
// Pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""
        <relativePath/> <!-- lookup parent from repository -->
    <description>spring application</description>




Run the Application

Now, it’s time to run the application. To do so, right-click on the project (current project) and select run like:

Run As->Java Application

It will trigger an event to execute the application.

You can see the running application status in the console tab at the bottom of the IDE.

Well, we have learned how to download, install, and setup the STS (Spring Tool Suit) IDE in local system. We created a spring application and successfully run as well.

In our next article, we will learn Dependency Injection concept that is most important concept of the Spring framework.

About the author

Irfan Khan

I’m a software programmer having more than 5 years of development experience in Java and related technology. I love to write technical content as well and love to share the technical knowledge to make it available for all.