In the last blog, I had shown you how to create a Spring boot web application using spring initializr.
Today we are going to learn how to create a spring boot web application using a Spring tool suit IDE. Before diving into it we need a prerequisite for this lesson. Of course, we need a Spring tool suite.
How to creat Spring boot application using spring tool suite IDE
Launch your Spring tool suit and right-click on File then New and now find Spring Starter Project.
Once you snap the Spring starter project, a new window will pop up. Make sure the service URL is https://start.spring.io
and in the Name section, you can give your project name. As this is a tutorial project I'll name as FirstWebApplication.
In Group type in.learnjavaskills and Artifact FirstWebApplication. In Group I had the name as in.learnjavaskills
because the naming convention of Group should be like this (Your domain extension).(your domain name) and always user Artifact names as your project name.
Finally but not least make sure the java version, packaging, type, and language as shown in the below image. If you wish to change this setting go ahead and try it.
Now follow the next button, you will get the following screen. Search the web on below of Available and select spring Web as shown in the below screen after configuring this window, snap-on Finish.
Now it will take some time to download spring dependencies. I always get this question, how long it will take to complete, well it depends on your internet speed, so have some coffee and wait for some time until it gets download completed.
Once the download completed, goa to the project explorer tab and expand FirstWebApplication. your project structure should look like this.
How to Run this application
Open FirstWebApplication class.and code will look like this except print statement.
To run this application, right-click on class or project, Run as Spring boot App
You should get the following out in the console
Conclusion
You have learned how to creating and launching your first spring boot application using a spring tool suit. If you wish to create a spring web application using Spring Initializr then check out this how to create a spring boot web application using spring initializr
Thanks for reading, Keep learning and keep reading. Have a wonderful day.