首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >spring boot template might not exist or might not be accessible by any of the configured Template Re

spring boot template might not exist or might not be accessible by any of the configured Template Re

作者头像
凯哥Java
发布2019-06-28 18:30:56
8K0
发布2019-06-28 18:30:56
举报
文章被收录于专栏:凯哥Java凯哥Java

错误信息:

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "pages/sys/reg.html", template might not exist or might not be accessible by any of the configured Template Resolvers

a76e00b4706057ea75b175c8da472562.png
a76e00b4706057ea75b175c8da472562.png

中文大致意思:

解析pages/sys/reg.html错。错误原因:模板可能不存在,或者任何配置的模板冲突解决程序都无法访问模板。

很明白,说没有找到reg.html文件。

解决方案:

在配置文件:

spring.thymeleaf.mode=HTML5
spring.thymeleaf.cache=false
spring.thymeleaf.encoding=utf-8
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
或者在yml文件中;
thymeleaf:
    mode: HTML
    encoding: utf-8
    cache: false
    prefix: classpath:/templates/

这样就可以了

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-05-12 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档