Learning Spring Boot from Zero to Cloud: Part 27 – Bean Scopes, Singleton and some Telemetry josedacruz, May 6, 2025May 9, 2025 In this video, we dive deep into the most common and default bean scope in Spring Boot: Singleton. You’ve probably used it a hundred times without thinking — but do you really know how it works under the hood and why it’s used by default? We’ll walk through real-world examples (outside the usual @Service/@Repository), explore the lifecycle, drawbacks, workarounds, and even patterns and anti-patterns you should know to avoid painful architectural mistakes. If you’re ready to level up your Spring knowledge, you’re in the right place! 🌱 👇 Chapters and Topics Covered: ⏱️ Timestamps00:00 – Introduction01:44 – What is a Singleton Bean in Spring?02:38 – Why Singleton is the Default & Its Benefits04:31 – How to Define Singleton Beans04:57 – Implications and Drawbacks07:03 – Workarounds That Actually Work (and why)11:15 – Lifecycle of Singleton Beans12:36 – Patterns and Anti-Patterns14:08 – Lazy Singleton Example15:15 – Singleton and Proxies16:04 – Other Ways to Intercept HTTP Requests17:10 – See it in Action – Code Practice 💡 Whether you’re building microservices, APIs, or modular monoliths, understanding the Singleton scope deeply can save you hours of debugging and design flaws. 📁 Code examples & slides available here:📁 GitHub source code: GitHub – josedacruz/youtube-springboot 👍 Like this video? Don’t forget to hit the Like button, Subscribe for more Spring Boot deep dives, and comment your favorite Spring trick or question! Related spring-boot