Page 12 of the Spring Framework Version 1.1.2 states:
"This potentially delayed visibility of some configuration issues is why ApplicationContext by default pre-instantiates singleton beans. At the cost of some upfront time and memory to create these beans before they are actually needed, you find out about configuration issues when the ApplicationContext is created, not later. If you wish, you can still override this default behavior and set any of these singleton beans to lazy-load (not be pre-instantiated)."
I've tried setting singleton beans as lazy-init = "true", but the framework still tries to instantiate an instance when ApplicationContext is created.
If the documentation incorrect? Is there any way around the framework trying to pre-instanstiate singleton beans?


Reply With Quote