From cb27277d333e9ecb22bc84ad46e9cf06cc195247 Mon Sep 17 00:00:00 2001 From: AmyliaY <471816751@qq.com> Date: Sun, 19 Jul 2020 11:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B7=AF=E5=BE=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mybatis-DyanmicSqlSourcce.md | 32 +++++++++---------- docs/SpringBoot/Spring-Boot-Run.md | 24 +++++++------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/Mybatis/核心处理层/Mybatis-DyanmicSqlSourcce.md b/docs/Mybatis/核心处理层/Mybatis-DyanmicSqlSourcce.md index bc375df..5bba804 100644 --- a/docs/Mybatis/核心处理层/Mybatis-DyanmicSqlSourcce.md +++ b/docs/Mybatis/核心处理层/Mybatis-DyanmicSqlSourcce.md @@ -22,9 +22,9 @@ -![image-20191219151247240](/image/mybatis/image-20191219151247240.png) +![image-20191219151247240](../../../images/mybatis/image-20191219151247240.png) -![image-20191219151408597](/image/mybatis/image-20191219151408597.png) +![image-20191219151408597](../../../images/mybatis/image-20191219151408597.png) ```java public class MixedSqlNode implements SqlNode { @@ -53,7 +53,7 @@ public class MixedSqlNode implements SqlNode { `org.apache.ibatis.scripting.xmltags.IfSqlNode#apply` -![image-20191219152254274](/image/mybatis/image-20191219152254274.png) +![image-20191219152254274](../../../images/mybatis/image-20191219152254274.png) ```java /** @@ -90,7 +90,7 @@ public class StaticTextSqlNode implements SqlNode { - 解析`trim`标签 -![image-20191219152502960](/image/mybatis/image-20191219152502960.png) +![image-20191219152502960](../../../images/mybatis/image-20191219152502960.png) - 在解析`trim`的时候会往下解析下级标签 @@ -107,7 +107,7 @@ public class StaticTextSqlNode implements SqlNode { -![image-20191219152655746](/image/mybatis/image-20191219152655746.png) +![image-20191219152655746](../../../images/mybatis/image-20191219152655746.png) ```JAVA @Override @@ -161,17 +161,17 @@ public class StaticTextSqlNode implements SqlNode { ``` -![image-20191219153341466](/image/mybatis/image-20191219153341466.png) +![image-20191219153341466](../../../images/mybatis/image-20191219153341466.png) 存在返回`true` 执行完成就得到了一个sql -![image-20191219153553127](/image/mybatis/image-20191219153553127.png) +![image-20191219153553127](../../../images/mybatis/image-20191219153553127.png) 继续执行`org.apache.ibatis.scripting.xmltags.DynamicSqlSource#getBoundSql`方法 -![image-20191219155129772](/image/mybatis/image-20191219155129772.png) +![image-20191219155129772](../../../images/mybatis/image-20191219155129772.png) - 发送sql`org.apache.ibatis.executor.SimpleExecutor#doQuery` @@ -259,7 +259,7 @@ public class StaticTextSqlNode implements SqlNode { - `org.apache.ibatis.executor.BaseExecutor#doQuery` - `org.apache.ibatis.executor.SimpleExecutor#doQuery` -![image-20191219160832704](/image/mybatis/image-20191219160832704.png) +![image-20191219160832704](../../../images/mybatis/image-20191219160832704.png) ```java private Statement prepareStatement(StatementHandler handler, Log statementLog) throws SQLException { @@ -276,7 +276,7 @@ public class StaticTextSqlNode implements SqlNode { ``` -![image-20191219160908212](/image/mybatis/image-20191219160908212.png) +![image-20191219160908212](../../../images/mybatis/image-20191219160908212.png) - `org.apache.ibatis.executor.statement.BaseStatementHandler#prepare` - `org.apache.ibatis.executor.statement.PreparedStatementHandler#instantiateStatement` @@ -330,7 +330,7 @@ public class StaticTextSqlNode implements SqlNode { - 接下来需要考虑的问题是如何将`?`换成我们的参数`2` - ![image-20191219161555793](/image/mybatis/image-20191219161555793.png) + ![image-20191219161555793](../../../images/mybatis/image-20191219161555793.png) - `org.apache.ibatis.executor.statement.StatementHandler#parameterize` - `org.apache.ibatis.executor.statement.RoutingStatementHandler#parameterize` @@ -343,11 +343,11 @@ public class StaticTextSqlNode implements SqlNode { -![image-20191219162258040](/image/mybatis/image-20191219162258040.png) +![image-20191219162258040](../../../images/mybatis/image-20191219162258040.png) 这样就拿到了`value`的值 -![image-20191219162506920](/image/mybatis/image-20191219162506920.png) +![image-20191219162506920](../../../images/mybatis/image-20191219162506920.png) 准备工作就绪了发送就可以了 @@ -376,11 +376,11 @@ public class StaticTextSqlNode implements SqlNode { -![image-20191219163628214](/image/mybatis/image-20191219163628214.png) +![image-20191219163628214](../../../images/mybatis/image-20191219163628214.png) -![image-20191219163640968](/image/mybatis/image-20191219163640968.png) +![image-20191219163640968](../../../images/mybatis/image-20191219163640968.png) -![image-20191219163957488](/image/mybatis/image-20191219163957488.png) +![image-20191219163957488](../../../images/mybatis/image-20191219163957488.png) 处理后结果如上 diff --git a/docs/SpringBoot/Spring-Boot-Run.md b/docs/SpringBoot/Spring-Boot-Run.md index 08436bb..196616e 100644 --- a/docs/SpringBoot/Spring-Boot-Run.md +++ b/docs/SpringBoot/Spring-Boot-Run.md @@ -137,11 +137,11 @@ public class Application { - `SpringFactoriesLoader.loadFactoryNames(type, classLoader)` 是spring提供的方法,主要目的是读取`spring.factories`文件 - 读取需要创建的内容 -![image-20200318080601725](../../../images/SpringBoot/image-20200318080601725.png) +![image-20200318080601725](../../images/SpringBoot/image-20200318080601725.png) - 创建完成 - ![image-20200318080901881](../../../images/SpringBoot/image-20200318080901881.png) + ![image-20200318080901881](../../images/SpringBoot/image-20200318080901881.png) @@ -151,21 +151,21 @@ public class Application { `SharedMetadataReaderFactoryContextInitializer` - ![image-20200318081112670](../../../images/SpringBoot/image-20200318081112670.png) + ![image-20200318081112670](../../images/SpringBoot/image-20200318081112670.png) - 同样的再找一个`DelegatingApplicationContextInitializer` - ![image-20200318081322781](../../../images/SpringBoot/image-20200318081322781.png) + ![image-20200318081322781](../../images/SpringBoot/image-20200318081322781.png) - 下图中的所有类都有Order数值返回 排序前: - ![image-20200318081352639](../../../images/SpringBoot/image-20200318081352639.png) + ![image-20200318081352639](../../images/SpringBoot/image-20200318081352639.png) 排序后: -![image-20200318081458019](../../../images/SpringBoot/image-20200318081458019.png) +![image-20200318081458019](../../images/SpringBoot/image-20200318081458019.png) @@ -378,7 +378,7 @@ public class Application { ### exceptionReporters -![image-20200318085243888](../../../images/SpringBoot/image-20200318085243888.png) +![image-20200318085243888](../../images/SpringBoot/image-20200318085243888.png) @@ -465,9 +465,9 @@ public class Application { -![image-20200318090128983](../../../images/SpringBoot/image-20200318090128983.png) +![image-20200318090128983](../../images/SpringBoot/image-20200318090128983.png) -![image-20200318090312626](../../../images/SpringBoot/image-20200318090312626.png) +![image-20200318090312626](../../images/SpringBoot/image-20200318090312626.png) @@ -504,7 +504,7 @@ public class Application { - 数据结果 -![image-20200318090935285](../../../images/SpringBoot/image-20200318090935285.png) +![image-20200318090935285](../../images/SpringBoot/image-20200318090935285.png) - 子类的具体实现不展开了 @@ -534,7 +534,7 @@ public class Application { - `primarySources` 就是我们的项目启动类,在`SpringApplication`的构造器中有`this.primarySources = new LinkedHashSet<>(Arrays.asList(primarySources))` -![image-20200318091558233](../../../images/SpringBoot/image-20200318091558233.png) +![image-20200318091558233](../../images/SpringBoot/image-20200318091558233.png) @@ -608,7 +608,7 @@ private int load(Object source) { - 通过前文我们已经知道 `source`就是一个class - ![image-20200318092027020](../../../images/SpringBoot/image-20200318092027020.png) + ![image-20200318092027020](../../images/SpringBoot/image-20200318092027020.png)