Spring Puzzlers - second season
summary
A collection of real Spring gotchas with concrete fixes: annotations on interfaces (like @PostConstruct) are ignored so a custom BeanFactoryPostProcessor is written to scan interfaces and inject init-method names — it works after reflective hacks; JavaConfig bean definitions often lack the concrete class/return-type so interface annotations don’t behave the same as @Component; @Value in configuration must be static for early initialization; injecting generic Lists + @Qualifier matches by bean type/generic not just name; prototype beans are not destroyed by the container.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:07Iron and soldering iron puzzle
- 17:26Qualifier problem
- 23:49Two programmers story
- 35:25Actors and qualifiers puzzle
- 39:00Property placeholder and static methods
- 44:09External configs and @Value
- 46:42Constructors and @Autowired
- 47:30Terminators and destroy methods
- 50:27XML and destroy methods
related talks
53mSpring Puzzlers
49mBreaking the Spring Framework's code: annotation's witchcraft
53mModern Java Component Design with Spring 4.3
35mSpring Framework 5: Hidden Gems
59mModern Java Component Design with Spring 4 3
01h 31mIt's a Kind of Magic: Under the Covers of Spring Boot
44mKeep Spring at Arm's Length!
18mSpring Framework 5: Hidden Gems
