1、单例模式(Spring默认机制)
代码:
2、原型模式,每次从容器中get的时候,都会产生一个新对象
注意:
3、其余的request、session、application,这些只能在web开发中使用到