no getter for property named 'xxx'

記錄一個錯誤解決辦法,html

部分報錯信息:java

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: 

There is no getter for property named 'keyNum' in 'class java.lang.String'

 

出現緣由:spring

這裏出現的問題是在DAO方法中定義的參數 與 實體中定義的屬性不一致 致使的。apache

解決方案:mybatis

dao層對應方法參數列表中加@Param("keyNum")註解便可code

相關文章
相關標籤/搜索