AnnotationConfigApplicationContext: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=External= =Internal= * Spring Dependency Injection and Inversion of Control Container Concepts#AnnotationConfigApplicationContext|Spring Dependency Injection and Inversio...") |
|||
Line 1: | Line 1: | ||
=External= | =External= | ||
* https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/AnnotationConfigApplicationContext.html | |||
=Internal= | =Internal= |
Revision as of 20:03, 23 November 2018
External
Internal
Overview
AnnotationConfigApplicationContext is a standalone application context that accepts @Configuration-annotated classes, as well as stereotype-annotated classes and JSR-330 compliant classes using javax.inject annotations as input. In case of multiple @Configuration classes, @Bean methods defined in later classes will override those defined in earlier classes. This can be leveraged to deliberately override certain bean definitions via an extra @Configuration class. Component classes can be registered one by one using register(Class), or they can be detected via the component scan mechanism, triggered by scan(String) method. This application context is used by the Spring Boot applications.