@Configuration
Learn @Configuration (Spring MVC Configuration, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes @Configuration marks a class as a source of bean definitions. Spring reads its @Bean methods and registers the returned objects in the container. Stereotype : it is itself meta-annotated with @Component , so component scanning picks it up. Typical use : define infrastructure beans ( DataSource , ObjectMapper , view resolvers) and import other configuration with @Import .
More lessons in Spring MVC Configuration
- XML-Based Configuration
- Java-Based Configuration
- @EnableWebMvc
- WebMvcConfigurer
- Component Scanning
- MVC Configuration
- Static Resource Configuration
- Message Converter Configuration
- Formatter Configuration
- Interceptor Configuration
- View Resolver Configuration
- Mini Project: Configuring Spring MVC with WebMvcConfigurer