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:
⏱️ Timestamps
00:00 – Introduction
01:44 – What is a Singleton Bean in Spring?
02:38 – Why Singleton is the Default & Its Benefits
04:31 – How to Define Singleton Beans
04:57 – Implications and Drawbacks
07:03 – Workarounds That Actually Work (and why)
11:15 – Lifecycle of Singleton Beans
12:36 – Patterns and Anti-Patterns
14:08 – Lazy Singleton Example
15:15 – Singleton and Proxies
16:04 – Other Ways to Intercept HTTP Requests
17: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: [https://github.com/josedacruz/youtube...](https://github.com/josedacruz/youtube...)
👍 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!
🔖 Tags
#SpringBoot #SingletonScope #JavaDeveloper #SpringBean #BeanScopes #SpringTips #SoftwareArchitecture #SpringBootDeepDive #Telemetry #FeatureFlags #SpringInterceptor #JavaArchitecture #SpringLifecycle #BackendDevelopment