原文:【SpringBoot+Mybatis+thymeleaf報錯】Error resolving template "XXX", template might not exist or might not be accessible by any of the configured

解決方法一: 原因:在使用springboot的過程中,如果使用thymeleaf作為模板文件,則要求HTML格式必須為嚴格的html 格式,必須有結束標簽,否則會報錯。 在application.yml中添加以下配置 spring: thymeleaf: prefix: classpath: templates mode: HTML cache: false encoding: UTF 新版本不 ...

2019-04-29 18:57 2 17244 推薦指數:

查看詳情

template might not exist or might not be accessible by any of the configured

報這個錯的前提是在springboot的項目中使用了thymeleaf模版或freemarker模版。 然后原因一般有二: 1.真的沒有這個模版文件,或是模版文件路徑不正確。 2.在非模版頁面的請求中沒有使用@RestController或@ResponseBody注解,或是反過來,在模版 ...

Sat May 09 14:55:00 CST 2020 0 14854
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM