Caused by: org.springframework.data.mapping.PropertyReferenceException: No property month found for type TbExamResult!
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tbExamResultDao‘: Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property month found for type TbExamResult!
报错原因: 在实体TbExamResult类中month字段命名为tradeMonth 而在tbExamResultDao 中的findByMonth 函数中却写成了Month
解决方法: 把findByMonth改成 findByTradeMonth即可
总结: 实体属性命名时,首字母要小写。而findBy函数中则把首字母大写
转载请注明原文地址: https://ju.6miu.com/read-1123735.html