Skip to main content

@EnableWebMvc

Learn @EnableWebMvc (Spring MVC Configuration, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes @EnableWebMvc imports the default Spring MVC configuration ( DelegatingWebMvcConfiguration ), which registers handler mappings, adapters, converters and validators. Where : put it on a @Configuration class in a plain Spring MVC (non Boot) application. Customizing : implement WebMvcConfigurer in the same class to change parts of the defaults.

More lessons in Spring MVC Configuration