Time for action – adding Spring jars to the project
Let's take a look at how we can add the spring-related jars via the Maven configuration:
- Open
pom.xml
; you can findpom.xml
under the root directory of the project itself. - You will see some tabs at the bottom of the
pom.xml
file. If you do not see these tabs, then right-click onpom.xml
and select the Open With option from the context menu and choose Maven POM editor. Select the Dependencies tab and click on the Add button in the Dependencies section. Don't get confused with the Add button of the Dependencies Management section. You should choose the Add button in the left-hand side pane. - A Select Dependency window will appear; enter Group Id as
org.springframework
, Artifact Id asspring-webmvc ...
Get Spring MVC Beginner’s Guide 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.