spring boot template might not exist or might not be accessible by any of the configured Template Resolvers错误

简介 错误信息:org.thymeleaf.exceptions.TemplateInputException:Errorresolvingtemplate"pages/sys/reg.html",templatemightnotexistormightnotbeaccessiblebyanyoftheconfiguredTemplateResolvers中文大致意思:解析pages

🔔🔔好消息!好消息!🔔🔔

 如果您需要注册ChatGPT,想要升级ChatGPT4。凯哥可以代注册ChatGPT账号代升级ChatGPT4

有需要的朋友👉:微信号 kaigejava2022

错误信息:

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

中文大致意思:

解析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/

这样就可以了

TopTop