Where did you get this bean?
summary
Explains exactly how Spring Boot actually creates and chooses beans: auto‑configuration classes listed in spring.factories register beans and proxies (e.g. Spring Data repositories), ASM‑based checks like ConditionalOnClass avoid loading types, and presence/absence checks like ConditionalOnProperty or ConditionalOnMissingBean control creation. Shows how @ConfigurationProperties gets bound, how configuration ordering and @EnableAutoConfiguration interact, and how to write focused tests that load only selected configs. Demonstrates concrete failure modes and how to debug them.
AI-written summary · about
chapters (5)
- 0:00Start
- 0:36Spring contexts are also called Spring loc containers, which are responsible for instantiating, configuring, and assembling beans by reading configuration metadata from XML, Java annotations, and/or Java code in the configuration files.
- 5:54Defining beans by annotating classes
- 10:20Configuration properties easier
- 19:00ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify existing classes or to dynamically generate classes, directly in binary form.
related talks
01h 31mIt's a Kind of Magic: Under the Covers of Spring Boot
47mDemystifying Spring Boot Magic
48mWhere Did You Get That Bean?
45mJava: Where did you get this bean?
59mSpring Boot Autoconfiguration: A Look Behind the Scenes
01h 46mIt's a kind of magic: under the covers of Spring Boot
46mSpring Boot under the hood
49mMagical Beans and Mystery
