<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>基础支持层 on 知识铺的博客</title>
    <link>https://index.zshipu.com/geek/tags/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/</link>
    <description>Recent content in 基础支持层 on 知识铺的博客</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Wed, 06 Mar 2024 11:17:00 +0000</lastBuildDate>
    <atom:link href="https://index.zshipu.com/geek/tags/%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81%E5%B1%82/index.xml" rel="self" type="application/rss+xml" />
    <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>
  </channel>
</rss>
