Alex Rivera | Logout

spring MVC sample web app

Asked 2009-04-22T15:51:11.397
19

I'm looking for an example Spring MVC 2.5 web app that I can easily:

  • Setup as a project in Eclipse
  • Deploy to a local app server (using Ant/Maven)

There are a couple of example applications included with the Spring distribution ('petclinic' and 'jpetstore'), but they don't provide any Eclipse project files (or a way to generate them). They also seem a bit complicated for my needs, e.g. require a local database to be setup.

Edit
Report

3 Answers

4

There's a Maven archetype (template project structure) for Spring MVC here:

http://docs.codehaus.org/display/MAVENUSER/Archetypes+List

That's a good starting place for this kind of investigation. To create an archetype using Maven, first install Maven:

http://maven.apache.org/plugins/maven-install-plugin/

and then create a project using the archetype:

http://maven.apache.org/guides/introduction/introduction-to-archetypes.html

You can also use the m2eclipse plugin for Eclipse to simplify this and it takes you through the stages of the project using a wizard. Just right click -> New Project -> Other, Maven and select the archetype. Hope that helps.

answered 2009-04-22T16:13:59.360
3

Just spotted http://blog.springsource.com/2010/07/22/spring-mvc-3-showcase/ which could be interessting for you.

answered 2010-07-26T08:32:22.183
1

You could also use Spring Roo to do this. http://www.springsource.org/roo

answered 2010-06-17T05:50:59.840

Your Answer