Skip to content
José da Cruz

Enterprise Architect, and Life Thinker

José da Cruz

Enterprise Architect, and Life Thinker

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:

⏱️ 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: 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

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • architecture (167)
  • artificial-intelligence (6)
  • books (2)
  • courses (4)
  • decision-frameworks (4)
  • finances (1)
  • java (8)
  • life-improvement (20)
  • metrics (3)
  • observability (2)
  • puzzles and challenges (3)
  • reviews (1)
  • security (8)
  • Soft Skills (1)
  • spring-boot (36)
  • Systems Thinking (3)
  • GitHub Weekly: AI Agent Tools Trending Right Now (November 2 – November 8, 2026)
  • Designing a Distributed Session Store: Why Sticky Sessions Break Under Load
  • Essential Reading: Release It! — Why Production Is a Different Game Than Development
  • GitHub Weekly: Top 10 Trending Repos (October 26 – November 1, 2026)
  • GitHub Weekly: Architecture & Infra Tools Worth a Look (October 19 – October 25, 2026)
©2026 José da Cruz | WordPress Theme by SuperbThemes