Breaking the Spring Framework's code: annotation's witchcraft
summary
Builds small Spring examples that show how annotations become runtime behavior: a custom ProxyPostProcessor and an InvocationHandler that swallows exceptions until a reflection bug is fixed, an annotation-driven PointcutAdvisor with a MethodInterceptor that uppercases String returns, and a timing interceptor wired via an imported AutoProxyRegistrar. Demonstrates when Spring picks Dynamic proxies vs CGLIB class proxies, how to force proxy-target-class, how advices stack and order, and the real surprise: tests can pass while non-interface beans fail at runtime.
AI-written summary · about
chapters (12)
- 0:00Introduction to Spring annotations
- 3:02What are annotations in Spring
- 7:00Dynamic proxies in Spring
- 8:05Creating the Expelliarmus spell
- 15:24Limitations of annotation magic
- 17:11Exploring Spring’s proxy mechanisms
- 24:42Aspect-oriented programming basics
- 27:54The Engorgio spell demonstration
- 36:43Logging execution time with Logus Dingus
- 41:21Enabling custom spellcasting
- 43:08Combining multiple spells
- 44:40Q&A session
related talks
53mSpring Puzzlers
01h 01mThe Proxy fairy and the magic of Spring
51mSpring Puzzlers - second season
49mOn @annotations - liberate yourselves from demons
45mBreaking the Magician's Code Diving deeper into Spring Boot internals
55mOn Annotations — Time to Stop the Demons
44mKeep Spring at Arm's Length!
50mRevealing the magic behind Java annotations
