Spring Tutorial 12 - Using ApplicationContextAware

preview_player
Показать описание
We'll provide our beans with access to the ApplicationContext object by implementing the ApplicationContextAware interface. We'll also use BeanNameAware interface to get the name of the bean configured in the Spring XML.
Рекомендации по теме
Комментарии
Автор

To all the people out there learning from this series. Koushik is covering all the topics from the official spring docs in concise and digestible manner. @Koushik sir - Thank you so much for these series.

kunaldas
Автор

You are just awesome Koushik. Your grasp of fundamental concepts and the ease with which you explain them is incredible. Thanks a lot for all your work. Wish you all the best!

rktguy
Автор

Thanks for your videos! Greetings from Mexico

guillermopalaciosgaray
Автор

The way of teaching is very nice welldone bro..

supermanrocks
Автор

Very helpful and informative tutorial .. i must say all your tutorials are very easy to understand, they clear all the basic concepts and good jack for beginners.... keep it up :)

ruchu
Автор

Yes even I read somewhere that usage of those interfaces is discouraged by Spring developers as it strongly ties your application to the framework, while the aim of Spring is always to be the least possible invasive framework.

The use of those interfaces is intended only for projects that somehow extend the framework itself (for example, plugins that help integrate Spring with other technologies or frameworks). Unless this is your case, you shouldn't be messing around with this stuff.

nehaagrawal
Автор

Koushik..Your tutorial is awesome.Go ahead..Thanks.

abun
Автор

This is very good tutorial...Thanks a lot

purushnv
Автор

Koushik bhai Harmoniyum bza dala .. good video

AbhishekSharma-uhpb
Автор

how does using applicationContextAware help to get new instances of PointA, B and C. Though we can call the getBean insde traiangle using context object. The Triangle object itself is Singleton and will be created only once!...Where do we come across such situations? Can u plz provide an eg?

SS-sndf
Автор

Hi
How does setBeanName(String beanName) method get executed and displays the bean name for the class, when its no where called in DrawingApp.java or any other class?

taruchitgoyal
Автор

what is the alternative for ApplicationContextAware implementation to get context object, because to avoid depending on spring framework

suryavattikuti
Автор

Hi i am new to Spring and i have following question, its seems like ApplicationContextAware is a functional interface which has only one method void ), can we use lambda expression here, will it be meaningful?

prateshtamhankar
Автор

Thanks for your videos would appreciate if you can come up with ejb as well as webservices tutorials

sairajoct
Автор

Hi,

I have question..If the the class is not a bean then can we get the existing applicationcontext in that standalone class. If it is a bean, we can easily get a  handle to it by extending Applocationawarecontext class. 
But, please let me know if it is possible for a class that is not handled by spring container. Please note, that  I am not asking to create a new applicationcontext . The requirement is to access the existing application context in standalone class.
By the way, great videos Sir!! Bravo!!

Regards
Singh

JagdeepSingh-nmef
Автор

Still I am not clear the use of Kindly complete your above example where Triangle class in Singelton and pointA, pointB & pointC require to be implement as Prototype. How we can achieve it through ApplicationContext reference in triangle class .

vivekmit
Автор

What is the use case of application Context aware?

AnubhavShrivastava
Автор

Even though it is bad practice is there ever a time where using ApplicationContextAware is a good idea?

KentOJohnson
Автор

I don't get what the 2 overrided function is used for...

vanthuanluong
Автор

If you created more than one beans with the same class, what will you get from setBeanNameAware? String of beanName or String[ ] of beanNames?

breeli
welcome to shbcf.ru