Is it possible to have two IoC containers in one JVM ? If so, is there a way to use objects created in one container in other using "@Configurable" ?
-DKC
There can be multiple contexts. They can be totally separate, and they can have a parent-child relation. In the latter case, they behave as if they are one. In the former - no, you can't.
you can not have more than one ioc container but you can configure and use more than one type of ioc configuration, say using setter method , constructor arguments and autowored together
here is a nice post to show how to do it in a single application
Spring IOC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With