<div dir="ltr" style="text-align: justify;">
<div style="text-align: justify;">
<div style="font-family: calibri, sans-serif; text-align: justify;">
<div style="font-size: 12pt;">Hello friends lets discuss another important components Spring Boot Initializr of Spring Boot, it is a quick way to create spring boot project structure. In this article we are going to explore about Spring Boot Initializr with STS IDE. Spring Boot Initializr is used to quick start new Spring Boot Maven/Gradle projects within no time. It generates initial project structure and builds scripts to reduce Development time.Spring Tool Suite3 has long been a fantastic IDE for developing Spring applications. Since version 3.4.0 it has also been integrated with the Spring Initializr, making it a great way to get started with Spring Boot.</div>
<div></div>
<h2 style="font-size: 12pt;"><b>Related tutorials previously we have discussed</b></h2>
<ul style="text-align: left;">
<li><a href="https://dineshonjava.com/introduction-to-spring-boot-a-spring-boot-complete-guide/"><b>Introduction of Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/essentials-key-components-and-internals-of-spring-boot-framework/"><b>Key Components of Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-cli-installation-and-hello-world-example/"><b>Spring Boot CLI</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-initilizr-web-interface-and-examples/"><b>Spring Boot Initializr Web Interface</b></a></li>
</ul>
</div>
</div>
<h2><b>Create a new Spring Boot application in Spring Tool Suite</b></h2>
<div style="font-family: calibri, sans-serif; text-align: justify;">
<div style="font-size: 12pt;">
<p><b><br />
</b> <b>Step 1:</b> Select the <b>New </b>>; <b>Spring Starter Project</b> menu item from the <b>File </b>menu.</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/06/Spring-Boot-STS-2.jpg" border="0" /></div>
<p><b>Step 2:</b> We will get the following “<b>Spring Starter Project</b>” Wizard to provide our project related information.</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/06/Spring-Boot-STS.jpg" border="0" /></div>
<p><b>Step 3:</b> Please provide our Spring MVC Maven Web Application Project details as shown below and Click on “<b>Next</b>” Button</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/06/Spring-Boot-STS-3.jpg" border="0" /></div>
<p><b>Step 4:</b> Click on “<b>Finish</b>” button to create our new Spring Boot Project.</p>
<p><b>Step 5: </b>Now Spring STS Suite creates a <b>Maven Project</b> and downloads all required Jars to our Maven Local Repository.</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/06/Spring-Boot-STS-4.png" border="0" /></div>
<p><b>Step 6: </b>Once the project has been imported into your workspace, you’re ready to start developing your application.</p>
<p><b>Step 7:</b> Execute Spring Boot Application <b>Run As >; Spring Boot Application</b> from the <b>Run </b>menu.</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/06/Spring-Boot-STS-5.png" border="0" /></div>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/06/Spring-Boot-STS-6.png" border="0" /></div>
<p><b>Step 8:</b> Access our Spring MVC application with “<b>http://localhost:8080/MySpringBootApp</b>” and observe the results</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/06/Spring-Boot-STS-7.png" border="0" /></div>
<h2><b>SpringApplication:</b></h2>
<p><span style="font-size: 12pt;">The </span><b style="font-size: 12pt;">SpringApplication </b><span style="font-size: 12pt;">class provides a convenient way to bootstrap a Spring application that will be started from a</span><b style="font-size: 12pt;"> main()</b><span style="font-size: 12pt;"> method. In many situations you can just delegate to the static</span></p>
<div style="text-align: justify;"><b>SpringApplication.run</b> method:</div>
<ul style="text-align: left;">
<li><b>SpringApplication </b>is one of the Spring Boot API classes.</li>
<li><b>SpringApplication </b>class is used to bootstrap a Spring application that will be started from a main() method</li>
</ul>
<pre class="highlight">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); 
 } 
} 
 
</pre>
<p><b>MySpringBootAppApplication </b>class is annotated with <b>@SpringBootApplication</b> annotation.</p>
<p><b>@SpringBootApplication</b> does the following things:</p>
<ul style="text-align: left;">
<li>Because of <b>@Configuration</b> annotation, It scans for <b>@Bean</b> methods to create beans.</li>
<li>Because of <b>@ComponentScan</b> annotation, It does component scanning (Components means Beans annotated with <b>@Component,@Service,@Repository,@Controller </b>etc).</li>
<li>Because of <b>@EnableAutoConfiguration</b> annotation, It triggers Spring Boot Auto-Configuration.</li>
</ul>
<p>When we run <b>MySpringBootAppApplication </b>class <b>main() </b>method, it make a calls to “<b>SpringApplication.run()</b>” method. Then this call done following things</p>
<ul style="text-align: left;">
<li>This call is used to create “<b>AnnotationConfigEmbeddedWebApplicationContext</b>”.</li>
<li>This “<b>AnnotationConfigEmbeddedWebApplicationContext</b>” instance is used to create an instance of “<b>TomcatEmbeddedServletContainerFactory</b>” class.</li>
<li>This “<b>TomcatEmbeddedServletContainerFactory</b>” is used to create an instance of “<b>TomcatEmbeddedServletContainer</b>” class.</li>
<li>“<b>TomcatEmbeddedServletContainer</b>” instance starts a Tomcat Container at default port number: <b>8080 </b>and deploys our Spring Boot <b>WebApplication</b>.</li>
</ul>
<h2><b>Summary</b></h2>
<p>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.</p>
<p>Happy Spring Boot Learning!!!</p>
<div style="background-color: #f2f9fc; border-radius: 3px; border: 1px solid #c9e6f2; line-height: 1.45; padding: 16px;">
<p><b>Spring Boot Related Topics</b></p>
<ol style="text-align: left;">
<li><b><a href="https://dineshonjava.com/introduction-to-spring-boot-a-spring-boot-complete-guide/">Introduction to Spring Boo</a>t</b></li>
<li><a href="https://dineshonjava.com/essentials-key-components-and-internals-of-spring-boot-framework/"><b>Essentials and Key Components of Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-cli-installation-and-hello-world-example/"><b>Spring Boot CLI Installation and Hello World Example</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-initilizr-web-interface-and-examples/"><b>Spring Boot Initializr Web Interface</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-initilizr-with-ides-via-spring-tool-suite/"><b>Spring Boot Initializr With IDEs</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-initializr-with-spring-boot-cli/"><b>Spring Boot Initializr With Spring Boot CLI</b></a></li>
<li><a href="https://dineshonjava.com/installing-spring-boot/"><b>Installing Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/developing-your-first-spring-boot-application-hello-world/"><b>Developing your first Spring Boot application</b></a></li>
<li><a href="https://dineshonjava.com/customizing-spring-boot-auto-configuration/"><b>External Configurations for Spring Boot Applications</b></a></li>
<li><a href="https://dineshonjava.com/logging-configuration-in-spring-boot/"><b>Logging Configuration in Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-with-spring-mvc-application/"><b>Spring Boot and Spring MVC</b></a></li>
<li><a href="https://dineshonjava.com/working-with-sql-databases-in-spring-boot-application/"><b>Working with SQL Databases and Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/mysql-configuration-with-spring-boot/"><b>MySQL Configurations</b></a></li>
<li><a href="https://dineshonjava.com/spring-data-jpa-using-in-spring-boot-application/"><b>Spring Data JPA using Spring Boot Application</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-with-nosql-technologies/"><b>Spring Boot with NoSQL technologies</b></a></li>
<li><a href="https://dineshonjava.com/spring-cache-tutorial/"><b>Spring Cache Tutorial</b></a></li>
<li><a href="https://dineshonjava.com/spring-security-tutorial-using-spring-boot/"><b>Spring Security Tutorial with Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-and-mongodb-in-rest-application/"><b>Spring Boot and MongoDB in REST Application</b></a></li>
<li><b><a href="https://dineshonjava.com/spring-boot-actuator-complete-guide/">Complete Guide for Spring Boot Actuator</a></b></li>
<li><b><a href="https://dineshonjava.com/microservices-with-spring-boot/">Microservices with Spring Boot</a></b></li>
</ol>
</div>
</div>
</div>
<p> ;</p>
</div>
<div class="wp-post-navigation"> 
									 <div class="wp-post-navigation-pre"> 
									 <a href="https://dineshonjava.com/spring-boot-initilizr-web-interface-and-examples/">Previous</a> 
									 </div> 
									 <div class="wp-post-navigation-next"> 
									 <a href="https://dineshonjava.com/spring-boot-initializr-with-spring-boot-cli/">Next</a> 
									 </div> 
									</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
 $.post('https://dineshonjava.com/wp-admin/admin-ajax.php', {action: 'mts_view_count', id: '143'});
});
</script>
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…