Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/back/comment_list.html]")] with root cause org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'list' cannot be found on null
时间: 2023-07-09 14:35:43 浏览: 165
这个错误是因为在模板文件中使用了一个名为"list"的属性或字段,但是它的值是null。这个问题通常出现在使用模板引擎时,例如Thymeleaf。
要解决这个问题,你需要检查代码中是否存在这个属性或字段,以及它是否被正确地初始化。如果这个属性或字段是从数据库或其他来源获取的,那么需要确保这个来源的连接和查询都是正确的。另外,你还可以在模板文件中使用条件语句或null安全操作符来处理这种情况,以确保页面不会因为这个错误而崩溃。
阅读全文
相关推荐








