目錄
- 錯誤提示
- 錯誤原因
- 錯誤改正
錯誤提示
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這個屬性