错误信息:
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/
这样就可以了