最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

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>

? ? ? ? ? ? ? ? <!--? ?描述存放資源的目錄,該路徑相對(duì)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不會(huì)將寫在src/main/java中的xml文件編譯或打包到編譯后的程序或者包中。

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


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

happyfe

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

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

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


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

thinkwind

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

qq_慕仔9056583 回復(fù) thinkwind

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

舉報(bào)

0/150
提交
取消

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

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

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

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