Alex_TD

Spring ----Bean 的作用域

Scope 作用域:<bean id="hello"  class="com.xx.Hello" scope=" singleton"> </bean>

1.单例(默认)singleton   创建后 只存在一个类实例

2.原型  prototype  创建后 存在多个类实例

3.请求  request

4.会话 session

5.应用程序 application

6.套接字websocket

posted on 2020-02-19 14:26  Alex_TD  阅读(89)  评论(0编辑  收藏  举报