welcome to my blog
渲染html时报错:Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field ‘createTime’ cannot be found on object of type ‘com.nowcoder.community.entity.Comment’ - maybe not public or not valid?
一开始我把实体Comment.java中的private Date createTime;
错写成了private Date createtime;
, 也就是time的首字母没有大写, 我把声明的变量以及set方法和get方法中的time的首字母改成大写, 重新运行还是报这个错误, 检查后发现忘记把set方法和get方法中的time首字母大写, 再次修改后成功运行!