原文:【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