<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Mybatis on 知识铺的博客</title>
    <link>https://index.zshipu.com/geek/tags/Mybatis/</link>
    <description>Recent content in Mybatis on 知识铺的博客</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Wed, 06 Mar 2024 11:34:00 +0000</lastBuildDate>
    <atom:link href="https://index.zshipu.com/geek/tags/Mybatis/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Mybats-GenericTokenParser</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybats-GenericTokenParser/</link>
      <pubDate>Wed, 06 Mar 2024 11:34:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybats-GenericTokenParser/</guid>
      <description>GenericTokenParser Author: HuiFer 源码阅读工程: SourceHot-Mybatis 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 /** * Copyright 2009-2019 the original author or authors. * &amp;lt;p&amp;gt; * Licensed under the</description>
    </item>
    <item>
      <title>Mybatis-SqlCommand</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-SqlCommand/</link>
      <pubDate>Wed, 06 Mar 2024 11:33:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-SqlCommand/</guid>
      <description>sqlCommand Author: HuiFer Description: 该文介绍 mybatis sqlCommand 类的源码 源码阅读工程: SourceHot-Mybatis org.apache.ibatis.binding.MapperMethod.SqlCommand 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 /** * 核心内容: sql id , Sql 类型 */ public static class SqlCommand { /** * sql id */ private final String name; /** * sql 类型</description>
    </item>
    <item>
      <title>Mybatis-ParamNameResolver</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-ParamNameResolver/</link>
      <pubDate>Wed, 06 Mar 2024 11:32:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-ParamNameResolver/</guid>
      <description>ParamNameResolver 源码解析 Author: HuiFer Description: 该文介绍 mybatis @Param 注解和ParamNameResolver 源码阅读工程: SourceHot-Mybatis 源码 org.apache.ibatis.reflection.ParamNameResolver 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95</description>
    </item>
    <item>
      <title>Mybatis-ObjectWrapper</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-ObjectWrapper/</link>
      <pubDate>Wed, 06 Mar 2024 11:31:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-ObjectWrapper/</guid>
      <description>Mybatis ObjectWrapper Author: HuiFer 源码阅读工程: SourceHot-Mybatis 源码位于: org.apache.ibatis.reflection.wrapper.ObjectWrapper‘ 类图： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69</description>
    </item>
    <item>
      <title>Mybatis-MethodSignature</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-MethodSignature/</link>
      <pubDate>Wed, 06 Mar 2024 11:30:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-MethodSignature/</guid>
      <description>MethodSignature Author: HuiFer Description: 该文介绍 mybatis MethodSignature 类 源码阅读工程: SourceHot-Mybatis org.apache.ibatis.binding.MapperMethod.MethodSignature 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120</description>
    </item>
    <item>
      <title>Mybatis-MetaObject</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-MetaObject/</link>
      <pubDate>Wed, 06 Mar 2024 11:29:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-MetaObject/</guid>
      <description>Mybatis MetaObject Author: HuiFer 源码阅读工程: SourceHot-Mybatis 源码位于:org.apache.ibatis.reflection.MetaObject 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84</description>
    </item>
    <item>
      <title>Mybatis-MapperMethod</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-MapperMethod/</link>
      <pubDate>Wed, 06 Mar 2024 11:28:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-MapperMethod/</guid>
      <description>MapperMethod Author: HuiFer Description: 该文介绍 mybatis MapperMethod 源码 源码地址: org.apache.ibatis.binding.MapperMethod,核心方法是execute 源码阅读工程: SourceHot-Mybatis 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 /** * CRUD 不同的执行</description>
    </item>
    <item>
      <title>Mybatis-DyanmicSqlSourcce</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-DyanmicSqlSourcce/</link>
      <pubDate>Wed, 06 Mar 2024 11:27:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-DyanmicSqlSourcce/</guid>
      <description>Mybatis DyanmicSqlSourcce Author: HuiFer 源码阅读工程: SourceHot-Mybatis org.apache.ibatis.scripting.xmltags.DynamicSqlSource org.apache.ibatis.scripting.xmltags.DynamicContext.DynamicContext 1 2 3 4 5 6 7 8 9 &amp;lt;select id=&amp;#34;list&amp;#34; resultType=&amp;#34;com.huifer.mybatis.entity.HsSell&amp;#34;&amp;gt; select * from hs_sell &amp;lt;trim prefix=&amp;#34;WHERE&amp;#34; prefixOverrides=&amp;#34;AND |OR&amp;#34;&amp;gt; &amp;lt;if test=&amp;#34;ID != null&amp;#34;&amp;gt; and ID = #{ID,jdbcType=INTEGER} &amp;lt;/if&amp;gt; &amp;lt;/trim&amp;gt; &amp;lt;/select&amp;gt; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 public class MixedSqlNode implements SqlNode { private final List&amp;lt;SqlNode&amp;gt; contents; public MixedSqlNode(List&amp;lt;SqlNode&amp;gt; contents) { this.contents = contents; } @Override public boolean apply(DynamicContext context) { // 调用 salNode 对象本身的 apply 方法解析 sql contents.forEach(node -&amp;gt; node.apply(context)); return true; } } 根据 mapper.xml 文件中的代码流程 需要走 org.apache.ibatis.scripting.xmltags.StaticTextSqlNode#apply org.apache.ibatis.scripting.xmltags.TrimSqlNode#apply org.apache.ibatis.scripting.xmltags.IfSqlNode#apply 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18</description>
    </item>
    <item>
      <title>Mybatis-DataSource</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-DataSource/</link>
      <pubDate>Wed, 06 Mar 2024 11:26:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-DataSource/</guid>
      <description>Mybatis DataSource Author: HuiFer Description: 该文介绍 mybatis DataSource 源码 源码阅读工程: SourceHot-Mybatis org.apache.ibatis.datasource.DataSourceFactory 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 /** * 数据源工厂 * @author Clinton Begin */ public interface DataSourceFactory { /** * 设置 dataSource 属性 * @param props */ void setProperties(Properties props); /** * 获取 dataSource * @return {@link DataSource} */ DataSource getDataSource(); } 类图如下 setProperties会将下列标签放入datasource中 1 2 3 4 5 6 &amp;lt;dataSource type=&amp;#34;POOLED&amp;#34;&amp;gt; &amp;lt;property name=&amp;#34;driver&amp;#34; value=&amp;#34;com.mysql.jdbc.Driver&amp;#34;/&amp;gt; &amp;lt;property name=&amp;#34;url&amp;#34; value=&amp;#34;jdbc:mysql://localhost:3306/mybatis?useSSL=false&amp;#34;/&amp;gt; &amp;lt;property name=&amp;#34;username&amp;#34; value=&amp;#34;mybatis&amp;#34;/&amp;gt; &amp;lt;property name=&amp;#34;password&amp;#34; value=&amp;#34;mybatis&amp;#34;/&amp;gt;</description>
    </item>
    <item>
      <title>Mybatis-Cursor</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-Cursor/</link>
      <pubDate>Wed, 06 Mar 2024 11:25:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-Cursor/</guid>
      <description>Mybatis Cursor Author: HuiFer Description: 该文介绍 mybatis Cursor 源码 源码阅读工程: SourceHot-Mybatis Cursor 源码位置:org.apache.ibatis.cursor.Cursor 继承Iterable说明是一个迭代器,继承Closeable说明有一个东西需要关闭 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 public interface Cursor&amp;lt;T&amp;gt; extends Closeable, Iterable&amp;lt;T&amp;gt; { /** * 游标开始从数据库</description>
    </item>
    <item>
      <title>Mybatis-Alias</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-Alias/</link>
      <pubDate>Wed, 06 Mar 2024 11:24:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/Mybatis-Alias/</guid>
      <description>Mybatis Alias Author: HuiFer Description: 该文介绍 mybatis Alias 源码 源码阅读工程: SourceHot-Mybatis 源码位置 :org.apache.ibatis.type.Alias 与 Alias 相关的一个方法org.apache.ibatis.type.TypeAliasRegistry.registerAlias(java.lang.String, java.lang.Class&amp;lt;?&amp;gt;)(别名注册) 1 2</description>
    </item>
    <item>
      <title>6、SqlSession组件</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/6SqlSession%E7%BB%84%E4%BB%B6/</link>
      <pubDate>Wed, 06 Mar 2024 11:23:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/6SqlSession%E7%BB%84%E4%BB%B6/</guid>
      <description>SqlSession 是 MyBatis 核心接口之一，也是 MyBatis 接口层的主要组成部分，对外提供 MyBatis 常用的 API。mybatis 提供了两个 SqlSession 接口的实现，分别为 DefaultSqlSession、SqlSessionManager，其中最常用的是 DefaultSqlSession。另外，跟前面分析过的源码 mybatis 的源码一样，my</description>
    </item>
    <item>
      <title>5、Executor组件</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/5Executor%E7%BB%84%E4%BB%B6/</link>
      <pubDate>Wed, 06 Mar 2024 11:22:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/5Executor%E7%BB%84%E4%BB%B6/</guid>
      <description>Executor 是 MyBatis 的核心接口之一，其中定义了数据库操作的基本方法。在实际应用中经常涉及的 SqISession 接口的功能，都是基于 Executor 接口实现的。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 public interface Executor { ResultHandler NO_RESULT_HANDLER = null; // 执行update、insert、delete三种类型的SQL语句</description>
    </item>
    <item>
      <title>4、StatementHandler</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/4StatementHandler/</link>
      <pubDate>Wed, 06 Mar 2024 11:21:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/4StatementHandler/</guid>
      <description>StatementHandler 接口是 MyBatis 的核心接口之一，它完成了 MyBatis 中最核心的工作，也是 Executor 接口实现的基础。 StatementHandler 接口中的功能很多，例如创建 Statement 对象，为 SQL 语句绑定实参，执行 select、insert、update、delete 等多种类型的 SQL 语句，批量执行 SQL 语句，将结果集映射成结果对象。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17</description>
    </item>
    <item>
      <title>3、ResultSetHandler</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/3ResultSetHandler/</link>
      <pubDate>Wed, 06 Mar 2024 11:20:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/3ResultSetHandler/</guid>
      <description>ResultSetHandler 是 MyBatis 中用来处理 JDBC ResultSet 对象的接口。ResultSetHandler 的作用是将 ResultSet 对象转化为用户需要的形式，例如 POJO、Map 或者是自定义的对象。ResultSetHandler 是 MyBatis 中非常重要的一个组件，它负责将数据库查询结果转化为用户需要的 Java 对象。 在 MyBatis 中，每次执行数据库查询操作时，</description>
    </item>
    <item>
      <title>2、SqlNode和SqlSource</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/2SqlNode%E5%92%8CSqlSource/</link>
      <pubDate>Wed, 06 Mar 2024 11:19:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/2SqlNode%E5%92%8CSqlSource/</guid>
      <description>MyBatis 是一个优秀的基于 Java 的持久层框架，它使用 XML 或注解来配置和映射原生信息，将接口和 Java 的 POJO(Plain Old Java Objects,普通的 Java 对象)映射成数据库中的记录。 在 MyBatis 中，SqlNode 和 SqlSource 是核心处理层的两个重要组件。 SqlNode：SqlNode 是 MyBatis 中用来表示一个 SQL 语句片段的接口。它可以是静态的 SQL 语句</description>
    </item>
    <item>
      <title>1、MyBatis初始化</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/1MyBatis%E5%88%9D%E5%A7%8B%E5%8C%96/</link>
      <pubDate>Wed, 06 Mar 2024 11:18:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E6%A0%B8%E5%BF%83%E5%A4%84%E7%90%86%E5%B1%82/1MyBatis%E5%88%9D%E5%A7%8B%E5%8C%96/</guid>
      <description>和 Spring 框架 的 IoC 容器初始化 一样，Mybatis 也会通过定位、解析相应的配置文件完成自己的初始化。Mybatis 的配置文件主要有 mybatis-config.xml 核心配置文件 及一系列映射配置文件，另外，Mybatis 也会根据注解进行配置。 1 BaseBuilder Mybatis 初始化 的主要内容是加载并解析 mybatis-config.xml 配置文件、映射配置文件以及相关的注解信息。M</description>
    </item>
    <item>
      <title>Mybatis-log</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/Mybatis-log/</link>
      <pubDate>Wed, 06 Mar 2024 11:17:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/Mybatis-log/</guid>
      <description>mybatis 日志源码 Author: HuiFer Description: 该文介绍 mybatis 日志相关源码 源码阅读工程: SourceHot-Mybatis 核心类 org.apache.ibatis.logging.Log org.apache.ibatis.logging.LogFactory 多个日志实现 org.apache.ibatis.logging.log4j2.Log4j2Impl org.apache.ibatis.logging.slf4j.Slf4jLocationAwareLoggerImpl &amp;hellip; 源码流程 mybatis 提供了一个日志接口,内容如下. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 /** * mybatis 的日志接口,提供日志级别 * &amp;lt;ol&amp;gt; * &amp;lt;li&amp;gt;error&amp;lt;/li&amp;gt; * &amp;lt;li&amp;gt;debug&amp;lt;/li&amp;gt; * &amp;lt;li&amp;gt;trace&amp;lt;/li&amp;gt; * &amp;lt;li&amp;gt;warn&amp;lt;/li&amp;gt; * &amp;lt;/ol&amp;gt; * &amp;lt;p&amp;gt;通过自己定义的接口来实现各大日</description>
    </item>
    <item>
      <title>Mybatis-Reflector</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/Mybatis-Reflector/</link>
      <pubDate>Wed, 06 Mar 2024 11:16:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/Mybatis-Reflector/</guid>
      <description>mybatis 反射 Author: HuiFer Description: 该文介绍 mybatis 反射相关类的源码 源码阅读工程: SourceHot-Mybatis addDefaultConstructor mybatis 的反射相关内容在org.apache.ibatis.reflection 下存放. 本片主要讲解org.apache.ibatis.reflection.Reflector类, 先看一下该类的属性 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16</description>
    </item>
    <item>
      <title>Mybatis-Cache</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/Mybatis-Cache/</link>
      <pubDate>Wed, 06 Mar 2024 11:15:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/Mybatis-Cache/</guid>
      <description>mybatis 缓存 Author: HuiFer Description: 该文介绍 mybatis Cache 源码 源码阅读工程: SourceHot-Mybatis org.apache.ibatis.cache.Cache 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 public interface Cache { String getId(); /** * 放入数据 */ void putObject(Object key, Object value); /** * 获取数据 */ Object getObject(Object key); /** * 移除数据 */ Object removeObject(Object key); /** * 清空数据 */ void clear(); /** * 有多少缓存数据 */ int getSize(); /** * 重入锁 * @return A ReadWriteLock */ default ReadWriteLock getReadWriteLock() { return null; } } BlockingCache: 阻</description>
    </item>
    <item>
      <title>4、缓存模块</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/4%E7%BC%93%E5%AD%98%E6%A8%A1%E5%9D%97/</link>
      <pubDate>Wed, 06 Mar 2024 11:14:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/4%E7%BC%93%E5%AD%98%E6%A8%A1%E5%9D%97/</guid>
      <description>MyBatis 中的缓存分为一级缓存、二级缓存，但在本质上是相同的，它们使用的都是 Cache 接口 的实现。MyBatis 缓存模块 的设计，使用了装饰器模式，这里不对此进行过多解析，以后会专门开一篇博文分析常用框架中使用到的设计模式。 1 Cache 组件 MyBatis 中缓存模块相关的代码位于 org.apache.ibatis.cache 包 下，其中 Cache 接口 是缓存模块中最核心的接</description>
    </item>
    <item>
      <title>3、binding模块</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/3binding%E6%A8%A1%E5%9D%97/</link>
      <pubDate>Wed, 06 Mar 2024 11:13:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/3binding%E6%A8%A1%E5%9D%97/</guid>
      <description>binding 模块主要为了解决一个历史遗留问题，原先查询一个 VO 对象 时需要调用 SqlSession.queryForObject(“selectXXVOById”, primaryKey)方法，执行指定的 sql 语句，第一个参数 selectXXVOById 指定了执行的 sql 语句 id，如果我们不小心写错了参数，Mybatis 是无法在</description>
    </item>
    <item>
      <title>2、DataSource及Transaction模块</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/2DataSource%E5%8F%8ATransaction%E6%A8%A1%E5%9D%97/</link>
      <pubDate>Wed, 06 Mar 2024 11:12:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/2DataSource%E5%8F%8ATransaction%E6%A8%A1%E5%9D%97/</guid>
      <description>在数据持久层，数据源和事务是两个非常重要的组件，对数据持久层的影响很大，在实际开发中，一般会使用 Mybatis 集成第三方数据源组件，如：c3p0、Druid，另外，Mybatis 也提供了自己的数据库连接池实现，本文会通过 Mybatis 的源码实现来了解数据库连接池的设计。而事务方面，一般使用 Spring 进行事务的管</description>
    </item>
    <item>
      <title>1、反射工具箱和TypeHandler系列</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/1%E5%8F%8D%E5%B0%84%E5%B7%A5%E5%85%B7%E7%AE%B1%E5%92%8CTypeHandler%E7%B3%BB%E5%88%97/</link>
      <pubDate>Wed, 06 Mar 2024 11:11:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Mybatis/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/1%E5%8F%8D%E5%B0%84%E5%B7%A5%E5%85%B7%E7%AE%B1%E5%92%8CTypeHandler%E7%B3%BB%E5%88%97/</guid>
      <description>在 Mybatis 的基础支持层主要看一下支撑 ORM 实现 的底层代码。 1 反射工具包 1.1Reflector Reflector 类 主要实现了对 JavaBean 的元数据属性的封装，比如：可读属性列表，可写属性列表；及反射操作的封装，如：属性对应的 setter 方法，getter 方法 的反射调用。源码实现如下： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32</description>
    </item>
    <item>
      <title>Sharding JDBC 分片策略四：Hint强制路由HintShardingStrategy</title>
      <link>https://index.zshipu.com/geek/post/mybatis/Sharding-JDBC-%E5%88%86%E7%89%87%E7%AD%96%E7%95%A5%E5%9B%9BHint%E5%BC%BA%E5%88%B6%E8%B7%AF%E7%94%B1HintShardingStrategy/</link>
      <pubDate>Mon, 23 May 2022 15:45:00 +0800</pubDate>
      <guid>https://index.zshipu.com/geek/post/mybatis/Sharding-JDBC-%E5%88%86%E7%89%87%E7%AD%96%E7%95%A5%E5%9B%9BHint%E5%BC%BA%E5%88%B6%E8%B7%AF%E7%94%B1HintShardingStrategy/</guid>
      <description>一、Hint强制路由HintShardingStrategy 在分库分区中，有些特定的SQL，Sharding-jdbc、Mycat、Vitess都不支持（可以查看相关文档各自对哪些SQL不支持）,例如：insert into table1 select * from table2 where &amp;hellip;.这种SQL 路由很麻烦，需要解析ta</description>
    </item>
  </channel>
</rss>
