Spring default behavior for lazy-init

后端 未结 5 883
长发绾君心
长发绾君心 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:41

    lazy-init is the attribute of bean. The values of lazy-init can be true and false. If lazy-init is true, then that bean will be initialized when a request is made to bean. This bean will not be initialized when the spring container is initialized and if lazy-init is false then the bean will be initialized with the spring container initialization.

提交回复
热议问题