Spring @Lookup Annotation | How to Inject Prototype Bean into Singleton Bean Correctly
Автор: The Curious Coder
Загружено: 2025-08-08
Просмотров: 510
Java Spring Boot Interview Q20 !!
In this video, we explore how @Lookup annotation solves a common issue in Spring Boot— when a Prototype-scoped bean is injected into a Singleton bean, it starts behaving like a Singleton.
You'll learn:
1) Why prototype inside singleton breaks expected behaviour
2) How @Lookup uses lookup method injection to fix it
3) Differences between singleton vs prototype scope
4) How to properly use @Scope, @Lookup, and Spring’s dependency injection model
Perfect for understanding bean scopes in Spring and how to manage singleton-prototype dependencies correctly.
00:00 : Introduction
01:53 : Bean Scope : Quick Revision
06:45 : Prototype Bean in Singleton Bean Problem
08:27 : Why @Lookup is Required
08:48 : How to use @Lookup
14:01: Interview Tip of the Day !
Bean Scopes (Part 1) : Singleton vs Prototype
• Understanding Bean Scopes: Singleton vs Pr...
Bean Scopes (Part 2) : Request vs Session
• Understanding Bean Scopes: Request vs Sess...
Instagram :
/ the.curious_coder
#interview #springboot #java
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: