1. 程式人生 > 程式設計 >使用mybatis-plus報錯Invalid bound statement (not found)錯誤

使用mybatis-plus報錯Invalid bound statement (not found)錯誤

近期使用Springboot整合Mybatisplus,執行insert時一直報錯,提示錯誤如下:
Invalid bound statement (not found): xx.insert
mapper繼承BaseMapper:

使用mybatis-plus報錯Invalid bound statement (not found)錯誤

BaseMapper有insert方法如下:

使用mybatis-plus報錯Invalid bound statement (not found)錯誤

service呼叫mapper.insert(物件)報錯

使用mybatis-plus報錯Invalid bound statement (not found)錯誤

某度查詢資料均不能解決問題,最終經查閱官方文件比對得知是缺少jar包導致。在pom.xml中引入:

<dependency>
      <groupId>com.baomidou</groupId>
      <artifactId>mybatis-plus-boot-starter</artifactId>
      <version>3.1.2</version>
    </dependency>
    <dependency>
      <groupId>com.baomidou</groupId>
      <artifactId>mybatis-plus-annotation</artifactId>
      <version>3.1.2</version>
    </dependency>
    <dependency>
      <groupId>com.baomidou</groupId>
      <artifactId>mybatis-plus-extension</artifactId>
      <version>3.1.2</version>
    </dependency>

附官方文件:
https://baomidou.com/guide/faq.html

到此這篇關於使用mybatis-plus報錯Invalid bound statement (not found)錯誤的文章就介紹到這了,更多相關mybatis-plus報錯not found內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!