Creating a Spring MVC project

In Eclipse, click menu File > New > Maven Project (or File > New > Other… > Maven Project). The New Maven Project dialog appears:
New Maven Project - select project name and location
Make sure you don’t check the option Create a simple project (skip archetype selection), and click Next
In the next screen, Select an Archetype, you may see a lot of archetypes in the list, so type spring-mvc into the Filter textfield to filter out the list, as shown below:
New Maven Project - select an Archetype - spring-mvc-archetype
If you don’t see the spring-mvc-archetype, click the Add Archetype… button. In the Add Archetype dialog, type the following information:
Specify Archetype for Spring MVC
    • Archetype Group Id: co.ntier
    • Archetype Artifact Id: spring-mvc-archetype
    • Archetype Version: 1.0.2
    • Repository URL: http://maven-repository.com/artifact/co.ntier/spring-mvc-archetype/1.0.2
 Click OK and wait for a moment while Eclipse is downloading the archetype. Finally you would see the spring-mvc-archetype in the list. Select it and click Next. In the next screen, Specify Archetype parameters, enter the following information (for example):
New Maven Project - specify archetype parameters
    • Group Id: MySpringMvc
    • Artifact Id: MySpringMvc
    • Version: leave this as default, 0.0.1-SNAPSHOT.
    • Package: net.codejava.spring
Click Finish

Comments

Popular posts from this blog

Import a GitHub project into Eclipse

Create Dynamic Web Project