java - How do I get a managed bean inside an unmanaged object? -


i have logger bean gets injected everywhere want log this:

@logger log log; 

following this blog.

now want able use logger bean in unmanaged object. how make object aware there managed logger out there use?

i've read somewhere using applicationcontext bad practice. maybe it's way? if so, best way this? this seems way go..?

thanks!

if can't make bean managed (by declaring in applicationcontext.xml), yes, 1 of 2 ways. in web application use webapplicationcontextutils application context.

another way use @configurable aspectj weaving, make unmanaged object - managed. prefer first option somehow.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -