Creating a basic Spring MVC project was a difficult thing for beginners because it involves so many steps from configuring all spring dependencies to deploying into some server. But once Spring Tool Suite introduced, creating a Spring MVC application has become a very simple process. In this post we are going to see how to create Spring MVC application using Spring Tool Suite within a minute.

Before going to start first let me tell you what are all the Pre-requisite software or jars which is required to develop the Spring MVC.
- Spring Tool Suite IDE 3.7.2 (Based on Eclipse Mars.1 (4.5.1)) – Download here
- Spring 4.1.1 – Maven is sufficient, no download is required.
- JDK 1.8 – Download from here
See Also:
How to Create Spring MVC Application using Java Configuration
First Create a New Project.

Note:
In some of the STS IDE, we can able to select Spring Project directly. If your STS are not having an option then got with this approach. Select Spring Legacy Project from the menu.
Once you select and click on next we will see a window to select Spring MVC Project. At the top we are required to give project name and click next. I have given as STSSpringMVCHelloWorld.

Followed by that we will get a window to give high level package name.

Creating Spring MVC application Using Spring Tool Suite – Give High Level Package
That’s it. We will get a project like this.

Note:
In some times we will get a project with errors. To avoid those errors, update the project using maven by following the below image. Right click the project, go to Maven and Update Project.


Once you click Update Project, we will get a window to select the project to Update. Also make sure Force Update of Snapshots/Releases checkbox is unchecked.
This STS bundled with Tomcat 7 and Tomcat 8, so by default we could see Server window in the STS Eclipse (See below Image). So we just have to add the project and start the server. That’s it.

How to add Project to the Server
Follow the below steps and add a Project to the Server which is bundled with STS.
Right click the Server and Click on Add and Remove.

We will see a window like this. Add our project and click on “Finish” and start the server. That’s it.

Open the browser and hit the URL as below.
http://localhost:8080/helloworld/

Note
I have added my message in HomeController.java and displayed it in home.jsp
We will see in detail about all the files in our next tutorials blogs. This How to Create Spring MVC application using Spring Tool Suite is available in my repository also, to download please click the link below.
Download link for How to Create Spring MVC application using Spring Tool Suite

Thanks.Seems spring boot also getting popular nowadays. Can you also include about spring boot as well.
Very helpful tutorial for beginners.
Very helpful blog. Thanks.
Good one very helpfull.
Very helpful tutorial. you save me time! thank you
Awesome, with very simple steps. Thanks
It helped me. Thanks
Whenever i try to run project i got an error like this…..
HTTP Status [404] – [Not Found]
Type Status Report
Message /Spring-jQuery-Datatable
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
let me know if any kind of solution you have. thanks
Can you check whether the application is properly deployed in Server. Also make sure the configuration details are correct.
how to start the server?