What is the default bean scope used by Spring Boot?

前端 未结 2 1267
时光取名叫无心
时光取名叫无心 2021-01-08 00:56

I can\'t find this information anywhere. Can someone explain how spring boot \'decides\' what the right scope is? Are the beans all singletons?

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-08 01:31

    Spring Boot doesn't decide anything about the bean scope, this is plain Spring framework functionality. Default bean scope is singleton scope (meaning, one instance of that bean in the application).

提交回复
热议问题