What is difference between singleton and prototype bean?

前端 未结 9 1867
攒了一身酷
攒了一身酷 2020-11-30 00:18

i\'m new to spring and i read this :

Basically a bean has scopes which defines their existence on the application

Singleton: means single bean def

9条回答
  •  难免孤独
    2020-11-30 01:03

    Singleton is same instance across application

    Prototype is new instance for every new request of getBean

提交回复
热议问题