exception e:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)が出た時のメモ

エラー内容

MyBatisを使い始めた時、以下のエラーが出た。

exception e:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

ステートメントがないのでバインドできませんとのこと。 ただ、必要なMapper.xml等は用意した状態。

解決法

mybatis-config.xmlにmapper resourceを記述する必要がある。

<mappers> 
    <mapper resource="XXXMapper.xml">
<mappers>

参考

stackoverflow.com