第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

Invalid bound statement (not found): com.example.mubatis_plus.mapper.UserMapper.selectAll 問題解決:pom添加

Invalid bound statement (not found): com.example.mubatis_plus.mapper.UserMapper.selectAll

問題解決:pom添加

<build>

? ? ? ? <resources>

? ? ? ? ? ? <resource>

? ? ? ? ? ? ? ? <!--? ?描述存放資源的目錄,該路徑相對POM路徑-->

? ? ? ? ? ? ? ? <directory>src/main/java</directory>

? ? ? ? ? ? ? ? <includes>

? ? ? ? ? ? ? ? ? ? <include>**/*.xml</include>

? ? ? ? ? ? ? ? </includes>

? ? ? ? ? ? </resource>

? ? ? ? </resources>

? ? ? ? <plugins>

? ? ? ? ? ? <plugin>

? ? ? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-boot-maven-plugin</artifactId>

? ? ? ? ? ? </plugin>

? ? ? ? </plugins>

? ? </build>


正在回答

2 回答

問題解決了就好。一般是要添加如下配置,不然有的ide不會將寫在src/main/java中的xml文件編譯或打包到編譯后的程序或者包中。

<resources>?
????<resource>?
????????<directory>src/main/java</directory>
????????<includes>?
????????????<include>**/*.xml</include>
????????</includes>
?????</resource>
?</resources>


0 回復 有任何疑惑可以回復我~
#1

happyfe

pom里加上這段,果然好使了,感謝!
2021-06-13 回復 有任何疑惑可以回復我~

按照課堂上的,是配置在application.yml文件中

mybatis-plus:
??mapper-locations:?classpath:mappers/*Mapper.xml


0 回復 有任何疑惑可以回復我~
#1

thinkwind

為什么添加了,還是報錯呢。Invalid bound statement (not found): com.abc.demo1.dao.UserMapper.selectAll
2020-05-14 回復 有任何疑惑可以回復我~
#2

qq_慕仔9056583 回復 thinkwind

看看UserMapper.xml文件中的namespace路徑,寫的是接口的全路徑而不是mapper.xml文件的全路徑。
2020-05-31 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

Invalid bound statement (not found): com.example.mubatis_plus.mapper.UserMapper.selectAll 問題解決:pom添加

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號