spring boot template might not exist or might not be accessible by any of the configured Template Resolvers错误
- 学习笔录-spring boot
- 时间:2019-05-12 15:54
- 6043人已阅读
简介
错误信息:org.thymeleaf.exceptions.TemplateInputException:Errorresolvingtemplate"pages/sys/reg.html",templatemightnotexistormightnotbeaccessiblebyanyoftheconfiguredTemplateResolvers中文大致意思:解析pages
🔔🔔🔔好消息!好消息!🔔🔔🔔
有需要的朋友👉:联系凯哥
错误信息:
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
中文大致意思:
解析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/
这样就可以了