报错EL1007E: Property or field ‘xxxxx’ cannot be found on null原因竟是这

报错EL1007E: Property or field ‘xxxxx’ cannot be found on null 是什么原因?

有时我们发现Springboot项目前端的 thymleaf 会报这样的错EL1007E: Property or field ‘xxxxx’ cannot be found on null

这是因为:

  • 后台传到前端的对象里没有xxxxx属性

  • 前端取属性xxxxx的名字写错了,所以取值不到


版权声明:本文为IT_YQG_原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。