mybatis plus Invalid bound statement (not found)

    科技2023-10-15  94

    mybatis plus因为jar冲突容易出现Invalid bound statement (not found)错误,怎么解决呢?

    1、依赖jar中删除mybatis、mybatis-spring相关jar,因为mybatis plus引入后自带

    2、如果引用了com.github.pagehelper的话,同样也得要排除相关jar,如果还要其他的也如下处理:

            <dependency>             <groupId>com.github.pagehelper</groupId>             <artifactId>pagehelper-spring-boot-starter</artifactId>             <exclusions>                 <exclusion>                     <groupId>org.mybatis</groupId>                     <artifactId>mybatis</artifactId>                 </exclusion>                 <exclusion>                     <groupId>org.mybatis</groupId>                     <artifactId>mybatis-spring</artifactId>                 </exclusion>             </exclusions>         </dependency>

    Processed: 0.015, SQL: 8