有個錯誤一直很郁悶,搞了半天才搞定。錯誤如下:
java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for
在unit裡測試怎麼也通不過,最後終于找到問題,原來是命名空間沒寫對,如果使用mapper,則
<mapper namespace="com.sitech.mapper.StudentMapper">
空間中一定要寫上Mapper的名稱,否則就會報錯。