Spring MVC Application Components

  • A collection of web pages to layout UI components.

  • A collections of Spring beans (controllers, services, etc).

  • Spring configurations (XML, Annotation, or Java).

Flow is always remain same for any technology.
UI -> xml -> Java -> DB


We will start building a Maven project for web-mvc now.

  • Create Maven project.

  • Right-click project go to project facet as below and click link.


maven project properties

  • Select dynamic web module. So that project will have webContent folder

maven project properties

  • Update your maven project

update maven project

  • Add web.xml to project see location WEB-INF/web.xml in webContent below image show how to add it automatically.

java ee tools

  • Project structure will be looking like below.

maven project structure

  • Once folder structure is ready go for adding code in pom.xml