MVC Configuration
Learn MVC Configuration (Spring MVC Configuration, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes MVC configuration means customizing Spring MVC (formatters, converters, interceptors, resource handlers, CORS, view controllers) by implementing WebMvcConfigurer in a @Configuration class. @EnableWebMvc turns on the MVC infrastructure in plain Spring; in Spring Boot it is already auto-configured, so you normally do not add it. Callback methods such as addInterceptors , addViewControllers and addCorsMappings are default methods: override only what you need.
More lessons in Spring MVC Configuration
- XML-Based Configuration
- Java-Based Configuration
- @Configuration
- @EnableWebMvc
- WebMvcConfigurer
- Component Scanning
- Static Resource Configuration
- Message Converter Configuration
- Formatter Configuration
- Interceptor Configuration
- View Resolver Configuration
- Mini Project: Configuring Spring MVC with WebMvcConfigurer