July 2016
Intermediate to advanced
490 pages
10h 54m
English
Before we create controllers for our PWP project, the Spring container must be ready for bean injections and component declarations. First, our Spring MVC container must be annotation-driven so that we can utilize the annotation stereotypes used by the current Spring Framework specification in configuring containers.
To enable the use of annotations inside classes, the following tag must be appearing in the pwp-servlet.xml:
<mvc:annotation-driven />
Second, when the <annotation-driven> tag is enabled, the container must automatically scan all component classes that are part of the Spring MVC web project. This will be enabled through inserting the following tag into the pwp-servlet.xml.
<context:component-scan base-package="org.packt.personal.web.portal" ...
Read now
Unlock full access