Step 1: Select the New > Spring Starter Project menu item from the File menu.
Step 2: We will get the following “Spring Starter Project” Wizard to provide our project related information.
Step 3: Please provide our Spring MVC Maven Web Application Project details as shown below and Click on “Next” Button
Step 4: Click on “Finish” button to create our new Spring Boot Project.
Step 5: Now Spring STS Suite creates a Maven Project and downloads all required Jars to our Maven Local Repository.
Step 6: Once the project has been imported into your workspace, you’re ready to start developing your application.
Step 7: Execute Spring Boot Application Run As > Spring Boot Application from the Run menu.
Step 8: Access our Spring MVC application with “http://localhost:8080/MySpringBootApp” and observe the results
The SpringApplication class provides a convenient way to bootstrap a Spring application that will be started from a main() method. In many situations you can just delegate to the static
package com.dineshonjava; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MySpringBootAppApplication { public static void main(String[] args) { SpringApplication.run(MySpringBootAppApplication.class, args); } }
MySpringBootAppApplication class is annotated with @SpringBootApplication annotation.
@SpringBootApplication does the following things:
When we run MySpringBootAppApplication class main() method, it make a calls to “SpringApplication.run()” method. Then this call done following things
Congratulation!!! Here we have learned how to create Spring Boot Application with Spring Boot Intilizr via STS IDE. And also discussed code flow of run this spring boot application.
Happy Spring Boot Learning!!!
Spring Boot Related Topics
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…