WebMvcConfigurationSupport | WebMvcConfigurerAdapter |
In the Spring MVC framework, this is the main class providing the configuration behind the MVC Java config. | This is simple adapter class for customizing some of the default configuration. |
We could use the @EnableWebMvc annotation to import the configuration of this class automatically. | This is not related to the @EnableWebMvc annotation. |
We could extend WebMvcConfigurationSupport class to prevent the default configuration imported by the @EnableWebMvc annotation. | We could extend WebMvcConfigurerAdapter class to customize some of the default configuration imported by @EnableWebMvc annotation. |
In the java configuration file for spring mvc either we could use @EnableWebMvc annotation or extend WebMvcConfigurationSupport class. | If we are extending this class, still required to use @EnableWebMvc annotation, otherwise application will not work. |
Labels: Spring MVC, Spring MVC interview questions, Spring4