1、单例设计模式
Spring 中 bean 的默认作用域就是 singleton(单例)的。
2、工厂设计模式
Spring使用工厂模式可以通过 BeanFactory
或 ApplicationContext
创建 bean 对象。
3、代理设计模式
Spring AOP 就是基于动态代理的
1、单例设计模式
Spring 中 bean 的默认作用域就是 singleton(单例)的。
2、工厂设计模式
Spring使用工厂模式可以通过 BeanFactory
或 ApplicationContext
创建 bean 对象。
3、代理设计模式
Spring AOP 就是基于动态代理的