Creating a Spring web application
In this recipe, we will build a simple Spring web application with Eclipse. We will:
- Create a new Maven project
- Add Spring to it
- Add two Java classes to configure Spring
- Create a "Hello World" web page
In the next recipe, we will compile and run this web application.
How to do it…
In this section, we will create a Spring web application in Eclipse.
Creating a new Maven project in Eclipse
- In Eclipse, in the File menu, select New | Project….
- Under Maven, select Maven Project and click on Next >.
- Select the Create a simple project (skip archetype selection) checkbox and click on Next >.
- For the Group Id field, enter
com.springcookbook
. For the Artifact Id field, enterspringwebapp
. For Packaging, selectwar
and click on Finish ...
Get Spring Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.