Lazy-init: Setting only works on beans with SCOP property Singleton.
1.true; lazy loading, which is instantiated the first time the bean is obtained through getbean to the container.
2.false: Indicates that spring start is instantiated immediately;
It is also possible to control lazy initialization in the container hierarchy by using the 'default-lazy-init' property on the <beans/> element. such as the following configuration:
<beans default-lazy-init= "true"><!--no beans would be eagerly pre-instantiated ...- ></beans>
If the scope property of a bean is scope= "Pototype", even if the lazy-init= "false" is set, the container starts without instantiating the bean, but instead invokes the Getbean method that is instantiated
The. Init-method property specifies the method that is executed at initialization time, and the Distory-method property specifies the method that is executed when the bean is destroyed.