SSM的 日常错误 之 mybatis

HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'create' in 'class com.imooc.oa.entity.ClaimVoucher'

     mybatis  最常见的的错误 就是  映射文件和entity类  结合的错误  少些 或 多写几个单词 就会造成致命的错误

    上面的提示是说 在我的映射文件中   resultMap 下没有找到 create 这个 属性名字   是因为我在entity里面的属性是creater  而在书写mybatis的映射文件时  少写了一个r 所以报这个错误的   真是一点疏忽就会出错啊

猜你喜欢

转载自www.cnblogs.com/qinning/p/10352030.html