How to Create a Spring Boot Project in IDE

In this topic, we will create a Spring Boot Project in the Eclipse IDE. We will learn to create Spring Boot Project, Configure and Run it step-by-step in Eclipse IDE. 
Table of content:
1. How to create a Spring Boot Project in Eclipse IDE?
2. Project Structure of  Spring Boot Project
3. How to run a Spring Boot Project in Eclipse IDE?
4. Conclusion

1. How to create Spring Boot Project in Eclipse IDE?
We are creating a Spring Boot project in the Eclipse IDE we need to integrate the STS plugin in Eclipse. These are the following steps for integrating STS plugin and creating Spring Boot Project in Eclipse:  
1. Open Eclipse IDE
2. Goto Help Tab 
3. Click on Eclipse Marketplace
4. Search STS 
5. Install STS
6. After installing STS click on the icon of the Spring Dashboard

create_project_in _spring_boot

7. Click on Create Spring Starter Project


8. Enter Project Name etc. and then click the Next Button

9. Select the Spring Boot Version and Select Dependency Library for our project.
10. Click on the Finish button then the project is successfully created. 

2. Project Structure of Spring Boot Project
This image is shown the Project Structure of the Spring Boot Project:

  create_project_in _spring_boot
Maven Dependency   

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




SpringBootApplication class: 

package com.poc;

import java.util.Arrays;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;

public class SpringBootConfigureProjApplication {

	public static void main(String[] args) {, args);
	public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
		return args -> {

			 System.out.println("Default Beans are configured:");

			String[] beanNames = ctx.getBeanDefinitionNames();
			for (String beanName : beanNames) {



→ @SpringBootApplication annotation enables features of these three annotations are:
          • @Configuration
          • @EnableAutoConfiguration
          • @ComponentScan
→ @Bean is a very important annotation in Spring Framework. This annotation is used in the method to return a bean to the Spring Context. This annotation can be used in the Configuration classes of the application.
→ ApplicationContext represents the Spring IoC container and is responsible for instantiating, configuring and managing beans.
→ CommandLineRunner is a Functional Interface that has a run(-) method.
→ “ctx.getBeanDefinitionNames()” returns all beans by default provided by Spring Boot in this application.

3. How to run a Spring Boot Project in Eclipse IDE?
Right-click on this  SpringBootAppliction class(automatically generated ) of this project then click on Run As and then click on Java Application. Now our project is running successfully. See the output console embedded tomcat server port to by default 8080 is started.

4. Conclusion
In this topic, we learned about How to integrate STS in Eclipse IDE, Create a Spring Boot Project in Eclipse IDE and Run a Spring Boot Project in Eclipse IDE.

Leave a Comment