用map保存两个page类时,可能会报如下错
Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "product.epFileName" (template: "index" - line 65, col 13)
Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "product.epFileName" (template: "index" - line 65, col 13)
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'epFileName' cannot be found on object of type 'com.hnust.demo.module.EbNews' - maybe not
这里我之前没有重新new,导致出错。重新new之后就好了。