The Proxy fairy and the magic of Spring
summary
Live-coding shows six concrete interception techniques and how they behave in Spring: a cached prime-number demo proves a decorator wired as a Spring bean works; a hand-built interface proxy (java.lang.Proxy) and a class proxy (CGLIB Enhancer) are generated and used successfully; a custom @Log aspect and Spring’s @Cacheable demonstrate ordering, self-invocation bypass, and cache eviction; a BeanPostProcessor returns proxies. Surprising gotchas: final methods are silently not proxied and internal method calls skip aspects unless you call the current proxy.
AI-written summary · about
chapters (8)
- 0:00Introduction and philosophy
- 7:12Dry principle and proxies
- 17:29Live coding with Spring caching
- 27:23Class proxies with CGlib
- 37:50Spring AOP and custom aspects
- 51:27Advanced proxy tricks
- 58:11Spring Data and proxies
- 1:00:40Summary and Q&A








