How can I get access to spring container?
Posted
by Antony
on Stack Overflow
See other posts from Stack Overflow
or by Antony
Published on 2010-04-16T19:52:29Z
Indexed on
2010/04/16
19:53 UTC
Read the original article
Hit count: 224
spring
I have a spring container running, and I have class with which I want to have access to the bean created inside spring container. The class I have is not registered with the spring container.
One thing I can do is that I can use MethodInvoker to call a static method, so I will have access to static field (this would be a bean from spring container) in my class always.
Do we have class like WebapplicationContextUtils for a application that is not web?
© Stack Overflow or respective owner