Code example for WebMvcConfigurationSupport

0
 * @author Stephen K Samuel samspade79@gmail.com 25 Mar 2012 20:49:26 
 *  
 */ 
 
@Configuration 
public class WebConfig extends WebMvcConfigurationSupport implements ApplicationListener<ContextRefreshedEvent> { 
 
	protected static final Logger			logger	= LoggerFactory.getLogger(WebConfig.class); 
 
	@Autowired 
	private GlobalModelAttributesInterceptor	globalModelAttributesInterceptor; 
 
	@Override 
	protected void addFormatters(FormatterRegistry registry) { 
	} 
 
	@Override 
	public void addInterceptors(InterceptorRegistry registry) { 
		registry.addInterceptor(globalModelAttributesInterceptor); 
	}