如果出現(xiàn)以下錯(cuò)誤:
Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/zgz/entity/UserMapper.xml
有可能是編譯的時(shí)候摊趾,沒(méi)將xml文件編譯進(jìn)去衰絮,在intellij使用maven進(jìn)行build的時(shí)候,需要進(jìn)行以下配置將xml文件進(jìn)行編譯:
<code><resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>*/.xml</include>
</includes>
</resource>
</resources>
</code>