Configuration of Spring Framework in Eclipse IDE
Hi Friends, Welcome to Spring Framework tutorials on websparrow.org. Before starting all the other things, first, we need to configure the Spring framework in your integrated development environment (IDE).
There are numbers of IDE where you can configure the Spring framework to develop your application. Check the list of IDEβsβ¦
- NetBeans
- Eclipse
- MyEclipse
- IntelliJ IDEA
- BlueJ
- Spring Tool Suite
and many other IDEβs available in the market.
Choosing IDE for Spring Framework
To develop Spring-based projects/applications, you can use any one IDE listed above but I prefer to use Eclipse IDE because itβs very easy to use, simple layouts, fast processing and itβs an open source (free).
Spring also provides its own IDE named as Spring Tool Suite. Itβs totally similar to Eclipse or you can say its replica of Eclipse.
Project Structure of Spring Framework
The project structure of the Spring framework is similar to other Java frameworks like Struts, Java web project, etc.

Creating Project in Eclipse IDE
To work with Spring framework, you need to create a Dynamic Web Project in your IDE. Check the simple process to create a web project.
Eclipse Β» File Β» New Β» Dynamic Web Project Β» Finish
Adding JARβs in Project
You canβt use Spring classes/API until you havenβt added the required jar files of Spring frameworks. You can resolve the dependency problem in two ways.
- Download the JAR file then add it into the
lib
folder inside theWEB-INF
. You can download the JARβs directly from this location.
Download Spring Framework- 4.3.9.RELEASE - Convert your Dynamic Web Project into Maven project then add the below dependencies in pom.xml
Note: To convert your Dynamic Web Project in Eclipse IDE to Maven Project, you can take help from this article. How to convert Dynamic Web Project to Maven Project in Eclipse
<!--spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>
<!--spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.9.RELEASE</version>
</dependency>
Project Structure in Eclipse IDE
To clear your doubts related to project structure, I have created a sample project in Eclipse IDE to demonstrate you that how the actual project structure looks like in Eclipse. This sample project is Dynamic Web Project later converted into Maven Project.

References
Similar Posts
- How to read properties file in Spring
- Spring @RestControllerAdvice Annotation Example
- Spring Boot RESTful Web Service with JPA and MySQL
- Spring Boot + Spring Security Authentication with LDAP
- Spring depends on attribute example
- Spring Boot + Angular 8 CRUD Example
- Spring Data CrudRepository Interface Example
- Spring AOP + AspectJ @Before, @After, @AfterReturning, @AfterThrowing, and @Around Annotation Example
- Difference between @PreAuthorize and @PostAuthorize Annotations in Spring Security
- Spring Boot RESTful Web Service Example