Тёмный

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

Java Techie
Подписаться 173 тыс.
Просмотров 25 тыс.
50% 1

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

Наука

Опубликовано:

 

28 июл 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 55   
@punzzycool
@punzzycool 2 года назад
Very good explanation with appropriate example. Keep it up the good work
@avinashsakroji1811
@avinashsakroji1811 Год назад
So nicely explained. Thanks for posting good contents on your channel.
@pavanim6258
@pavanim6258 Год назад
very well explained .Thank you so much for your crystal clear explanation
@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!
@sudheerkumar-tp1mg
@sudheerkumar-tp1mg Год назад
Deep knowledge
@dedeepyaamasa4441
@dedeepyaamasa4441 Год назад
As always you give quality content with explanation
@FactsNationReal
@FactsNationReal Год назад
Very knowledgeable.. 👍
@abhaymishra8112
@abhaymishra8112 Год назад
Good Topic. And nicely explained.
@tanujkumaragrawal4756
@tanujkumaragrawal4756 2 года назад
Thanks sir for keeping us updated
@arvindpandey8793
@arvindpandey8793 Год назад
Great
@utsavshrivastava9481
@utsavshrivastava9481 2 года назад
Great explanation
@neha6000
@neha6000 2 года назад
Once again thousand of thanks 🙏
@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
@midhunnair6932
@midhunnair6932 Год назад
Pls add this video under Interview QA playlist
@artemief
@artemief 3 дня назад
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
@MrNil1982
@MrNil1982 8 месяцев назад
Pay attention that @Lookup method must be NOT private, otherwise you will get NPE exception.
@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
@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.
@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"
@andresflores4434
@andresflores4434 Год назад
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 Год назад
Is this time you passed from controller
@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
@vrmupparaju
@vrmupparaju 9 месяцев назад
since its prototype scope, container will not destroy the beans ,how bean will be destroyed ??
@Javatechie
@Javatechie 9 месяцев назад
Why won't it be destroyed?
@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 ?
@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
@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
@sureshmanne7245
@sureshmanne7245 Год назад
What is the business scenario where a prototype bean passed into singleton bean?
@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
@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🙏
@swapnilburde7268
@swapnilburde7268 Год назад
Brother can you please use large font size so mobile users also view your code
@Javatechie
@Javatechie Год назад
Sure buddy will do that
@Hitesh-fe9cc
@Hitesh-fe9cc 10 дней назад
Solution: 8:20
@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
Далее
Stray Kids "Chk Chk Boom" M/V
03:26
Просмотров 28 млн
СДЕЛАЛА БРЕКЕТЫ ДОМА
01:01
Просмотров 920 тыс.
В GEOMETRY DASH СДЕЛАЛИ GTA
00:27
Просмотров 380 тыс.