It will be loaded into the JVM memory heap, managed by beanFactory, and the started one may not be loaded...
--If the Bean is a singleton, it will be loaded at startup by default. If lazy initialization is set, --or multiple instances will be loaded as needed (the object is referenced)...
================================
And it should be noted that if the object is obtained through multiple instances, in spring, it controls its memory releasethrough reference counting, so when using multiple instances of beans, remember to add references Set null For example: Bean b = new Bean();
It will be loaded into the JVM memory heap, managed by beanFactory, and the started one may not be loaded...
--If the Bean is a singleton, it will be loaded at startup by default. If lazy initialization is set,
--or multiple instances will be loaded as needed (the object is referenced)...
================================
And it should be noted that if the object is obtained through multiple instances, in spring, it controls its memory releasethrough reference counting,
so when using multiple instances of beans, remember to add references Set null
For example:
Bean b = new Bean();
//When not in use
b = null;
They are all placed in BeanFactory