The Spring MVC configuration

The Spring MVC framework can be configured with XML files or Java configuration classes. We will configure our application using Spring MVC configuration classes, the first being the WebAppConfig class:

package com.gieman.tttracker.web; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @EnableWebMvc @Configuration @ComponentScan("com.gieman.tttracker.web") public class WebAppConfig extends WebMvcConfigurerAdapter { @Override ...

Get Enterprise Application Development with Ext JS and Spring 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.