No video

Spring @Lookup Method Injection | Bean Scopes | Interview QA | JavaTechie

  Рет қаралды 25,360

Java Techie

Java Techie

2 жыл бұрын

This tutorial will explain you to understand how can you inject prototype bean into singleton bean in spring using @Lookup method injection
Spring boot microservice course Offer will close soon so Hurry-up & Register today itself!
COURSE LINK : javatechie5246.ongraphy.com/
PROMO CODE : Java40
GitHub:
github.com/Java-Techie-jt/loo...
Blogs:
/ javatechie
Facebook:
/ javatechie
guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
Disclaimer/Policy:
--------------------------------
Note : All uploaded content in this channel is mine and its not copied from any community ,
you are free to use source code from above mentioned GitHub account

Пікірлер: 54
@punzzycool
@punzzycool 2 жыл бұрын
Very good explanation with appropriate example. Keep it up the good work
@pavanim6258
@pavanim6258 Жыл бұрын
very well explained .Thank you so much for your crystal clear explanation
@avinashsakroji1811
@avinashsakroji1811 2 жыл бұрын
So nicely explained. Thanks for posting good contents on your channel.
@bugrae9341
@bugrae9341 2 жыл бұрын
So good and helpfull. I will wait another awesome video :D
@gasparcalix2095
@gasparcalix2095 Жыл бұрын
learning something i didn't know i need to learn, Excelente!
@dedeepyaamasa4441
@dedeepyaamasa4441 Жыл бұрын
As always you give quality content with explanation
@tanujkumaragrawal4756
@tanujkumaragrawal4756 2 жыл бұрын
Thanks sir for keeping us updated
@neha6000
@neha6000 2 жыл бұрын
Once again thousand of thanks 🙏
@FactsNationReal
@FactsNationReal Жыл бұрын
Very knowledgeable.. 👍
@abhaymishra8112
@abhaymishra8112 Жыл бұрын
Good Topic. And nicely explained.
@utsavshrivastava9481
@utsavshrivastava9481 2 жыл бұрын
Great explanation
@sudheerkumar-tp1mg
@sudheerkumar-tp1mg Жыл бұрын
Deep knowledge
@sahilbhasin2112
@sahilbhasin2112 2 жыл бұрын
Good, Can you cover real usecase for all bean scopes and in which best situation we can use other than default scope?
@Javatechie
@Javatechie 2 жыл бұрын
Okay I will
@arvindpandey8793
@arvindpandey8793 Жыл бұрын
Great
@midhunnair6932
@midhunnair6932 Жыл бұрын
Pls add this video under Interview QA playlist
@artemief
@artemief 20 күн бұрын
Hi How can I test a method(let's call it methodA) in which I call a method(let's call it methodB) annotated with @LookUp? Right now I am getting a NullPointerException error when calling methodB inside methodA
@thatoshebe5505
@thatoshebe5505 Жыл бұрын
Please share how we can unit test a method making use of @lookup bean
@dasariravinder
@dasariravinder 2 жыл бұрын
You could add @Lazy on the ObjectFactory ... that should give the effect of @Lookup? pls clarify
@Javatechie
@Javatechie 2 жыл бұрын
I guess you didn't get context on both the approach
@858Bikash
@858Bikash 2 жыл бұрын
Hi sir please make a video on singleton design pattern with all scenarios like (cloning, sterilization,thread safe tec.) with proper explanation
@Javatechie
@Javatechie 2 жыл бұрын
Bikash it is already there in my channel please search with keyword "singleton"
@PiyushDhanwani
@PiyushDhanwani 2 жыл бұрын
I have gone through all your angular vedios, but still there are many things which are not clear. It will be really helpful if you start a course to learn from Java script to reactive forms and then finally to angular framework.
@chakpang147
@chakpang147 2 жыл бұрын
If we create 2 UserService, is the hashcode of them still the same after using @Lookup?
@Javatechie
@Javatechie 2 жыл бұрын
Yes of course why do you think different behaviour here
@andresflores4434
@andresflores4434 2 жыл бұрын
You are amazing. But i have a question for you. How could i set the value of the weather ? Something like this. Inside UseService public String setCurrentTempFromAnotherAPI(String time) { return getWeatherServiceBean().setTodaysTemp(time); } I''m trying but allways i get a null value.
@Javatechie
@Javatechie 2 жыл бұрын
Is this time you passed from controller
@gourabbanik2043
@gourabbanik2043 2 жыл бұрын
Please make a video how to read data from xlsx Or xls and store in mysql Or any db
@Javatechie
@Javatechie 2 жыл бұрын
I guess I already did this in my spring batch video
@gourabbanik2043
@gourabbanik2043 2 жыл бұрын
@@Javatechie I didn't find it could you please share the link btw I asking about Apache poi dependency
@Javatechie
@Javatechie 2 жыл бұрын
My bad i thought your asking about XML but it's Excel let me check
@swapnilburde7268
@swapnilburde7268 Жыл бұрын
Brother can you please use large font size so mobile users also view your code
@Javatechie
@Javatechie Жыл бұрын
Sure buddy will do that
@sushantkumar2631
@sushantkumar2631 2 жыл бұрын
Sir make one video how to attend your class online from August 1
@Javatechie
@Javatechie 2 жыл бұрын
Sure buddy i will upload that tomorrow even I am thinking to make open session for 1st August let's see
@vrmupparaju
@vrmupparaju 10 ай бұрын
since its prototype scope, container will not destroy the beans ,how bean will be destroyed ??
@Javatechie
@Javatechie 10 ай бұрын
Why won't it be destroyed?
@vedhvaishvikreddy1199
@vedhvaishvikreddy1199 2 жыл бұрын
Sir, prerequisite for spring microservice course.. ?
@Javatechie
@Javatechie 2 жыл бұрын
Spring core is enough
@TravelLifeStyleWITheEXPLORE
@TravelLifeStyleWITheEXPLORE 2 жыл бұрын
Bhai weekly one deveops content pls.
@Javatechie
@Javatechie 2 жыл бұрын
Bhai content also required . Almost all Devops I uploaded with separate playlist
@TravelLifeStyleWITheEXPLORE
@TravelLifeStyleWITheEXPLORE 2 жыл бұрын
@@Javatechie Thanks🙏
@kunalsharma-zc2ho
@kunalsharma-zc2ho Жыл бұрын
Hi Basant , One doubt can we use similar approach for call static method from Service bean ? if not how should solve . My findings is we can use App. Context . ?
@Javatechie
@Javatechie Жыл бұрын
Static method simply you can call using ClassName . No service bean instance required to call that
@kunalsharma-zc2ho
@kunalsharma-zc2ho Жыл бұрын
My Bad ...calling a bean class method inside a static method ?
@sureshmanne7245
@sureshmanne7245 Жыл бұрын
What is the business scenario where a prototype bean passed into singleton bean?
@avinashshrivastava1512
@avinashshrivastava1512 2 жыл бұрын
I have taken your courses here i have one doubt if singleton bean inject in to prototype what will happen then
@Javatechie
@Javatechie 2 жыл бұрын
Ofcourse. You can always inject any type of bean. If you are defining the parent bean as Prototype and then you are trying to inject a Singleton into that, it will be injected. But, think if that is what you want to do. Singleton beans instance are created only once. The main reason behind creating the Prototype bean is to have new instance for each request. Still, the prototype bean will be created every request. But, the singleton bean will always be the same once you have injected.
@itsnarahari
@itsnarahari 2 жыл бұрын
Spring container will behave internally singleton only it will create one object if prototype
@Javatechie
@Javatechie 2 жыл бұрын
For singleton bean it will create only one instance and prototype it will behave as it is
@lordgreat6051
@lordgreat6051 2 жыл бұрын
Thank you sir but can you please make the fonts bigger it is difficult to see the code
@Javatechie
@Javatechie 2 жыл бұрын
It depends where are you watching if mobile then please fit it to screen. Thanks i will noted it and going forward will take care
@lordgreat6051
@lordgreat6051 2 жыл бұрын
@@Javatechie Thank you sir really appreciate it
@Hitesh-fe9cc
@Hitesh-fe9cc 27 күн бұрын
Solution: 8:20
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 41 МЛН
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 6 МЛН
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 17 МЛН
JMeter Full Course Masterclass | Step by Step for Beginners | Raghav Pal |
3:31:26
Automation Step by Step
Рет қаралды 989 М.
Spring Boot Tutorial | Full In-depth Course
3:11:18
Daily Code Buffer
Рет қаралды 526 М.
Singleton Design pattern in Java | Best Practice | Java Techie
16:00