Spring 框架中用到了哪些设计模式
1.代理模式:在AOP和Remoting中被用的比较多。比如(Spring AOP实现原理)
2.单例模式:在Spring配置文件中定义的Bean默认为单例模式
3.模板方法:用来解决代码重复的问题。比如SpringBoot的RestTemplate、JmsTemplate、JpaTemplate。
4.前端控制器:Spring 提供了DispatcherServlet来对请求进行转发。
5.试图帮助(View Helper):Spring提供了一系列的Jsp标签,高效宏来辅助将分散的代码整合到视图里。
6.依赖注入:(IoC)贯穿于BeanFactory/ApplicationContext接口的核心理念。
6.工厂模式:(IoC)BeanFactory用来创建对象的实例。