Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
158 views
Welcome To Ask or Share your Answers For Others

1 Answer

The easiest way to get up and running with a Spring MVC project is to use SpringSource Tool Suite, which is another free IDE based on Eclipse.

The integration between the IDE and Spring/Maven is tight, and it comes with an application server already setup for you to deploy your web app.

Follow these steps to get a working Spring MVC web app.

  1. To setup a new project in STS: Click File -> New -> Spring Template Project -> Spring MVC Project
  2. To pull in dependencies and compile your project: Right click your new project -> Run As -> Maven install
  3. To run your project inside an application server: Right click your new project -> Run As -> Run on Server -> SpringSource tc Server

If it works, you'll see a web page saying "Congratulations! You're running Spring!"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...