spring boot在intellij idea下整合mybatis可能遇到的問題
阿新 • • 發佈:2019-02-02
builder 整合 mapper iba nbsp res bound exce span
org.apache.ibatis.builder.BuilderException: Wrong namespace. Expected ‘com.sc.starry_sky.dao.UserMapper‘ but found ‘UserMapper‘.
這個錯誤是沒找到對應的mapper接口,檢查namespace寫對了沒
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
出現這個錯誤的原因xml文件沒有被編譯,在pom文件裏build標簽下面加入如下即可解決
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
spring boot在intellij idea下整合mybatis可能遇到的問題