zoukankan      html  css  js  c++  java
  • springboot整合mybatisplus报错:Failed to process, please exclude the tableName or statementId错误

    问题描述:

    在service层调用mybatis-plus的自带的save方法时,报错:Failed to process, please exclude the tableName or statementId。

    解决方法:

    只要在mybatis-plus的配置文件中去掉解析链即可

    import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;
    
    @Configuration
    public class MybatisPlusConfigure {
        /**
         * 分页插件
         */
        @Bean
        public PaginationInterceptor paginationInterceptor() {
            PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
            //List<ISqlParser> sqlParserList = new ArrayList<>();
            // 攻击 SQL 阻断解析器、加入解析链
            //sqlParserList.add(new BlockAttackSqlParser());
            //paginationInterceptor.setSqlParserList(sqlParserList);
            return paginationInterceptor;
        }
    }
  • 相关阅读:
    poj1988
    sgu488
    Walking around Berhattan
    基于矩阵分解的简单推荐算法
    Funny Feature
    php面向对象
    PHPstorm快捷键
    创建UIImage的两种方法
    dismissViewControllerAnimated有延迟
    17个常用代码整理
  • 原文地址:https://www.cnblogs.com/XueTing/p/13719652.html
Copyright © 2011-2022 走看看