After configuring the DispatcherServlet in web.xml, let's move ahead to create a Spring application context. For that, we need to add the following XML code in the spring-mvc-context.xml file:
<beans><!-- Schema definitions are skipped. --><context:component-scan base- package="com.packt.springhighperformance.ch4.controller" /><mvc:annotation-driven /></beans>
In the preceding XML code, we first defined a component scan tag, <context:component-scan />, for the com.packt.springhighperformance.ch4.controller package, so that all of the beans and controllers get created and autowired.
Then, we have used <mvc:annotation-driven /> to register automatically different beans and components that includes request ...