In this article, we will learn through step-by-step example to set up a maven-based project for Spring MVC web application in Eclipse IDE
Pre-requisite :
- Eclipse Kepler IDE
- Spring-4.0.0-RELEASE
- Maven 3.0.4
- Java 1.7
Step 1: Make sure you have latest eclipse IDE or else download from eclipse site
If you got the latest eclipse IDE, then you can proceed to next step
Step 2: Open Eclipse IDE
File Menu–> New–> Others
Step 3: After clicking Others, will opens “select a wizard”
Type spring–> select Spring Project–> Next
Step 4: Provide some meaningful project name like “SpringMVC-XMLBased” or
“SpringMVC-AnnotationBased à select “Simple Spring Web Maven” template à click “Finish”
Step 5: Run maven command “mvn clean” & “mvn install” for downloading dependent jars (assuming maven is integrated with the eclipse kepler IDE)
Step 6: A sample maven-based Spring MVC web project is ready to do implementation & you will get to see the below screenshot once above steps are completed successfully
Conclusion :
- We have created sample web application with maven integrated for Spring MVC framework. i.e.; project structure
Related Articles :
- Spring MVC Framework
- Spring MVC: Creating “Hello World” web application based on XML configuration
- Spring MVC: Annotation based “Hello World” web application
- Spring MVC: Multi-Controller actions using @Controller
- Spring MVC: Creating RESTful web service using annotation
- Spring MVC 4.0 Restful web service using @RestController annotation
- Spring MVC: Change default Spring-Dispatcher-Servlet.xml to user-defined context filename in web.xml
References :
Happy Coding !!
Happy Learning !!