• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
黄洪波写点东西的地方
博客园    首页    新随笔    联系   管理    订阅  订阅
ruoyicloud从mybatis升级至mybatis-plus

 

"error: can not execute. because can not find cache of TableInfo for entity!"

mybatis-plus框架TABLE_INFO_CACHE获取不到对应的TableInfo对象

https://blog.csdn.net/weixin_45525272/article/details/123694959

 

注意在yml配置中增加相关配置

 

# MyBatis-plus配置
mybatis-plus:
  # 搜索指定包别名
  typeAliasesPackage: com.ruoyi.**.domain
  # 配置mapper的扫描,找到所有的mapper.xml映射文件
  mapperLocations: classpath*:mapper/**/*Mapper.xml
  # 加载全局的配置文件
  configLocation: classpath:mybatis-plus/mybatis-plus-config.xml

 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
    <settings>
        <!--mapUnderscoreToCamelCase=true-->
        <setting name="mapUnderscoreToCamelCase" value="true"/>
    </settings>
    <!--<plugins>-->
    <!--<plugin interceptor="com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor"></plugin>-->
    <!--</plugins>-->

</configuration>

 

ruoyi-cloud集成mybatis-plus报错Unknown column ‘search_value‘ in ‘field list‘

 

解决方案:

com.ruoyi.common.core.domain.BaseEntity类中对相应字段增加注解@TableField(exist = false)

https://blog.csdn.net/weixin_45395031/article/details/120583286

 

 

整合mybatis-plus报错java.lang.NoSuchMethodError: org.apache.ibatis.session.Configuration

https://blog.csdn.net/alizhaoc/article/details/121807471

 

通过resolved查看jar版本依赖

ruoyi使用pagehelper,里面使用了mybatis,注意对应的版本要一致。

 

posted on 2023-08-11 17:38  红无酒伤  阅读(1749)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3