天天看点

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request错误提示错误原因错误改正

目录

  • 错误提示
  • 错误原因
  • 错误改正

错误提示

2019-09-04 10:57:58.257 ERROR 11308 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : 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/font/cpxq.html]")] with root cause

org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'bulletboxVideo1' cannot be found on object of type 'com.mbyte.easy.admin.entity.DoctorProduct' - maybe not public or not valid?
           

错误原因

看到这个提示后,去查看DoctorProduct实体类看到bulletboxVideo1没有,所以是这个属性写错了,改正之后就可以访问了

错误改正

后台

/**
*@author yibox
*/
model.addAttribute("doctorProduct", doctorProductService.list());
           

前台

var imgs = [[${doctorProduct.bulletboxVideo}]];
           

后台传入doctorProduct对象给前台,前台获取bulletboxVideo这个属性

继续阅读