<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[你的知识书架]]></title><description><![CDATA[关注微信公众号【你的知识书架】获取更多教学视频和学习资料]]></description><link>https://blog.csdn.net/Bcoder_m</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; Bcoder_m]]></copyright><item><title><![CDATA[【MybatisPlus】SpringBoot集成Mp完成CRUD操作]]></title><link>https://blog.csdn.net/Bcoder_m/article/details/120193673</link><guid>https://blog.csdn.net/Bcoder_m/article/details/120193673</guid><author>Bcoder_m</author><pubDate>Thu, 09 Sep 2021 09:09:04 +0800</pubDate><description><![CDATA[一、前言

在前几篇文章中，书架给大家介绍了Myabtis框架的核心用法。

现在我们把目光聚焦于由中国的小伙伴参与开发的开源框架MybatisPlus。官方上说，这个框架只是对Mybatis框架的增强，可以简化单表的增删改查操作，极大的提升开发效率。

下面我们就用实例来展现MybatisPlus的快速开始。

二、SpringBoot集成MybatisPlus快速开始

1.新建数据库和表结构



新建user表，表结构如上述图片所示，其中字段id为主键自增。

2.新建SpringBoot项目

首]]></description><category></category></item><item><title><![CDATA[【Mybatis】mybatis中的缓存机制]]></title><link>https://blog.csdn.net/Bcoder_m/article/details/120126722</link><guid>https://blog.csdn.net/Bcoder_m/article/details/120126722</guid><author>Bcoder_m</author><pubDate>Mon, 06 Sep 2021 09:22:14 +0800</pubDate><description><![CDATA[一、前言

缓存在实际的系统开发中经常用到，因为使用缓存可以更快的获取数据，避免频繁的数据库交互从而影响效率。

Mybatis作为持久化框架提供了非常强大的查询缓存的特性，一般说Mybatis的缓存都是指二级缓存，因为其一级缓存（也叫本地缓存）会被默认启用。

因此本节内容主要讲解二级缓存的基本配置用法，还会介绍Redis集成Mybatis框架搭建缓存。

二、一级缓存

缓存生效是怎么生效的？

首先上测试代码。


@Test
    public void test28() throws IOExc]]></description><category></category></item><item><title><![CDATA[【Mybatis】非常重要！mybatis完成参数接收及结果集返回的多种方式]]></title><link>https://blog.csdn.net/Bcoder_m/article/details/119884526</link><guid>https://blog.csdn.net/Bcoder_m/article/details/119884526</guid><author>Bcoder_m</author><pubDate>Tue, 24 Aug 2021 10:42:40 +0800</pubDate><description><![CDATA[一、前言

在使用Mybatis框架时，业务层会根据实际业务需求给Dao层传入参数，Dao层在根据传入的参数做了相关增删改查操作后会返回给业务层数据（从表中查询出的数据等）。

不管是接收参数还是返回结果集，Mybatis框架为了迎合多变的业务场景都给出了多种应对方案，下面将重点阐述这些方案。

二、Mybatis如何接收参数

方式一通过实体对象接收

在前几节的内容中，大部分的示例采用的都是这种方式，下面进行一个示例回顾。

Dao层接口UserMapper增加selectByPojo方法。


pub]]></description><category></category></item><item><title><![CDATA[【Mybatis】Mybatis核心配置文件深入之typeHandler标签（类型转换）与plugins标签（分页查询）]]></title><link>https://blog.csdn.net/Bcoder_m/article/details/119799502</link><guid>https://blog.csdn.net/Bcoder_m/article/details/119799502</guid><author>Bcoder_m</author><pubDate>Thu, 19 Aug 2021 12:54:04 +0800</pubDate><description><![CDATA[一、前言

本节内容主要聚焦于Mybatis框架的核心配置文件，主要介绍其中的类型处理器typeHandler与插件标签的用法plugins。

二、typeHandler标签

通常情况下我们表示数据都会预先给这个数据一个类型，比如在java中的数据类型包括字符串型String、整型int、字符型char等。

而与之对应的数据库中表示数据时也会有相应的数据类型，但当数据库中的某些字段的类型和Java对象中属性的类型对应不上时，在实现增删改查等操作时就需要typeHandler标签的参与。

举个例子来说]]></description><category></category></item><item><title><![CDATA[【Mybatis】功能强大的动态SQL之foreach批量查询、批量插入]]></title><link>https://blog.csdn.net/Bcoder_m/article/details/119571146</link><guid>https://blog.csdn.net/Bcoder_m/article/details/119571146</guid><author>Bcoder_m</author><pubDate>Tue, 10 Aug 2021 15:42:39 +0800</pubDate><description><![CDATA[前言

在【Mybatis】功能强大的动态SQL之if与choose（03）中介绍了Mybatis动态SQL的if用法，这一节将重点介绍foreach的用法。

在实际的业务场景中，业务层通常会将批量数据放入集合或者数组传给Dao层，并做相应的增删改查操作，而Mybatis可以利用foreach元素来处理集合。

foreach实现批量查询

在学习foreach之前，先给大家回顾一下SQL语句中的or和in的用法。

下面给出查询语句需要用到的表数据，一共七条数据。





假设有需求要查询id为1或.]]></description><category></category></item><item><title><![CDATA[【Mybatis】功能强大的动态SQL之if与choose（03）]]></title><link>https://blog.csdn.net/Bcoder_m/article/details/119378052</link><guid>https://blog.csdn.net/Bcoder_m/article/details/119378052</guid><author>Bcoder_m</author><pubDate>Wed, 04 Aug 2021 10:28:31 +0800</pubDate><description><![CDATA[大家好，我是书架呀。

在前两节的内容中，主要介绍了Mybatis框架依据Dao层接口、映射文件（写SQL语句的Mapper.xml文件）、配置文件SqlMapConfig.xml完成基本的增删改查工作。

这节内容书架将深入映射文件，介绍动态SQL。动态SQL的引入是为了解决复杂业务场景下，更好地控制传入参数对于SQL语句的影响。

项目的运行环境仍然采用【Mybatis】快速搭建01，这里不再赘述。

2.动态SQL-if

第一个运用在动态SQL中的法宝是if标签，通常用于where语句中，if主要用]]></description><category></category></item><item><title><![CDATA[【Mybatis】基于Mybatis完成基本的增删改查操作]]></title><link>https://blog.csdn.net/Bcoder_m/article/details/119168309</link><guid>https://blog.csdn.net/Bcoder_m/article/details/119168309</guid><author>Bcoder_m</author><pubDate>Wed, 28 Jul 2021 09:26:08 +0800</pubDate><description><![CDATA[大家好呀，我是书架。

【Mybatis】快速搭建01介绍了MyBatis框架如何在Dao层接口、映射文件（写SQL语句的Mapper.xml文件）、配置文件SqlMapConfig.xml组合下完成了对数据库的查询操作。

本次内容依然是在快速搭建01开发基础上更加全面的通过示例介绍基本的增删改查操作。

查询操作-select

我们在查询数据库时，通常会传入参数以筛寻符合条件的数据。那么SQL语句是如何接收传入的参数呢？

示例1-传入基本数据类型作为参数

Dao层接口UserMapper增加fi.]]></description><category></category></item></channel></rss>