> 设计模式源码地址:https://github.com/ggb2312/JavaNotes/tree/master/design-pattern (设计模式相关代码与笔记) > 设计模式类图地址:https://github.com/ggb2312/JavaNotes/tree/master/design-pattern/uml > 设计模式markdown笔记地址:https://github.com/ggb2312/JavaNotes/tree/master/design-pattern/notes > 简书地址:https://www.jianshu.com/nb/36824480 # 1. 前导 学设计模式最好有以下两点知识基础。 [软件设计七大原则](https://www.cnblogs.com/gj-blog/p/10929440.html) [UML类图以及类与类之间的关系](https://www.cnblogs.com/gj-blog/p/10929447.html) 原因: - 设计模式是围绕着软件设计七大原则来说的,每一种设计模式通常会满足一到两三种软件设计原则,同时又可能违反某一种原则。学习这些原则可以理解该设计模式适用什么业务场景以及为什么要这样做。 - 设计模式通常都伴随着面向对象的特性(封装、继承、多态),所以会涉及到大量的类与类之间的关系。通过画类图可以更好的理解设计模式。 # 2. 设计模式 ## 2.1 创建型 [创建型模式——简单工厂(不在GOF23种设计模式中)](https://www.cnblogs.com/gj-blog/p/10929455.html) [创建型模式——工厂方法(一)](https://www.cnblogs.com/gj-blog/p/10929460.html) [创建型模式——抽象工厂(二)](https://www.cnblogs.com/gj-blog/p/10929466.html) [创建型模式——建造者模式(三)](https://www.cnblogs.com/gj-blog/p/10929475.html) [创建型模式——单例模式(四)](https://www.cnblogs.com/gj-blog/p/10929478.html) [创建型模式——原型模式(五)](https://www.cnblogs.com/gj-blog/p/10929480.html) ## 2.2 结构型 [结构型模式——外观模式(一)](https://www.cnblogs.com/gj-blog/p/10929486.html) [结构型模式——装饰者模式(二)](https://www.cnblogs.com/gj-blog/p/10929489.html) [结构型模式——适配器模式(三)](https://www.cnblogs.com/gj-blog/p/10929498.html) [结构型模式——享元模式(四)](https://www.cnblogs.com/gj-blog/p/10929493.html) [结构型模式——组合模式(五)](https://www.cnblogs.com/gj-blog/p/10929506.html) [结构型模式——桥接模式(六)](https://www.cnblogs.com/gj-blog/p/10929510.html) [结构型模式——代理模式(七)](https://www.cnblogs.com/gj-blog/p/10929514.html) ## 2.3 行为型 [行为型模式——模板方法(一)](https://www.cnblogs.com/gj-blog/p/10929517.html) [行为型模式——迭代器模式(二)](https://www.cnblogs.com/gj-blog/p/10929524.html) [行为型模式——策略模式(三)](https://www.cnblogs.com/gj-blog/p/10929544.html) [行为型模式——解释器模式(四)](https://www.cnblogs.com/gj-blog/p/10929551.html) [行为型模式——观察者模式(五)](https://www.cnblogs.com/gj-blog/p/10929556.html) [行为型模式——备忘录模式(六)](https://www.cnblogs.com/gj-blog/p/10929563.html) [行为型模式——命令模式(七)](https://www.cnblogs.com/gj-blog/p/10929571.html) [行为型模式——中介者模式(八)](https://www.cnblogs.com/gj-blog/p/10929579.html) [行为型模式——责任链模式(九)](https://www.cnblogs.com/gj-blog/p/10929600.html) [行为型模式——访问者模式(十)](https://www.cnblogs.com/gj-blog/p/10929607.html) [行为型模式——状态模式(十一)](https://www.cnblogs.com/gj-blog/p/10929616.html) # 3. 最后 设计模式的学习主要参考`Geely老师的` [Java设计模式精讲 Debug方式+内存分析](https://coding.imooc.com/class/270.html) 中间也参考了无数的博客,这里只贴几个参考比较多的。 [chenssy设计模式](https://www.cnblogs.com/chenssy/category/482229.html)