Java – access spring beans * through dependency injection instead of*
•
Java
We have some domain objects created at runtime – not spring These domain objects need access to some service type beans managed by spring How do I dynamically access spring beans (not through DI) from domain objects created at runtime?
Solution
You must provide them with a reference to ApplicationContext or beanfactory so that they can get spring managed beans
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码