Spring bean的作用域

bean的作用域

scope标签属性:

  • singleton单例模式

    每次取到的bean都是同一个对象。

  • prototype原型模式

    每次取到不同的对象。

你可能感兴趣的:(javaspring)