Spring default behavior for lazy-init

后端 未结 5 896
长发绾君心
长发绾君心 2020-12-07 20:00

I am beginner to spring, ESP Inversion of control. I was puzzled understanding the difference between the following

 

        
5条回答
  •  被撕碎了的回忆
    2020-12-07 20:49

    The lazy-init="default" setting on a bean only refers to what is set by the default-lazy-init attribute of the enclosing beans element. The implicit default value of default-lazy-init is false.

    If there is no lazy-init attribute specified on a bean, it's always eagerly instantiated.

提交回复
热议问题