From 3362ce5f33bcf15c1e86b940745e8482ab4d1666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 15 Jan 2021 15:55:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20MybatisPlus=203.4.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- pom.xml | 2 +- ruoyi-admin/src/main/resources/application.yml | 2 +- .../com/ruoyi/framework/config/MybatisPlusConfig.java | 9 --------- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1d499b1a..a51e881d 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ * 容器改动 Tomcat 改为 并发性能更好的 undertow * 代码生成模板 改为适配 Mybatis-Plus 的代码 * 项目修改为 maven多环境配置 -* 重磅更新 升级MybatisPlus 3.4.1 重写配置文件详细注释 更新所有插件 +* 升级MybatisPlus 3.4.2 * 增加demo模块示例(给不会增加模块的小伙伴做参考) * 同步升级 3.3 diff --git a/pom.xml b/pom.xml index 5e01366a..2b8a33f1 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 4.1.2 1.7 0.9.1 - 3.4.1 + 3.4.2 5.4.0 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 4e0d2b76..57a93445 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -84,7 +84,7 @@ token: # https://baomidou.com/config/ mybatis-plus: # 对应的 XML 文件位置 - mapper-locations: classpath*:mapper/**/*Mapper.xml + mapperLocations: classpath*:mapper/**/*Mapper.xml # 实体扫描,多个package用逗号或者分号分隔 typeAliasesPackage: com.ruoyi.**.domain # 针对 typeAliasesPackage,如果配置了该属性,则仅仅会扫描路径下以该类作为父类的域对象 diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java index 7f46a758..9efbb962 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java @@ -1,7 +1,6 @@ package com.ruoyi.framework.config; import com.baomidou.mybatisplus.annotation.DbType; -import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator; import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; @@ -46,14 +45,6 @@ public class MybatisPlusConfig { return paginationInnerInterceptor; } - /** - * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除) - */ - @Bean - public ConfigurationCustomizer configurationCustomizer() { - return configuration -> configuration.setUseDeprecatedExecutor(false); - } - /** * 乐观锁插件 * https://baomidou.com/guide/interceptor-optimistic-locker.html