Is spring default scope singleton or not?

前端 未结 8 716
悲哀的现实
悲哀的现实 2020-11-28 08:17

Could you please explain why Spring is creating two objects for the configuration of beans shown below, since by default spring default scope is singleton?

The Sprin

8条回答
  •  醉梦人生
    2020-11-28 08:42

    Spring default scope is singleton and it will create one object for all instances unless you explicitly specify the scope to be prototype. You have not posted spring configuration. Please post it, it will give a better idea.

提交回复
热议问题