今天开发遇到这个问题,找不到这个login.html
使用RestController就没错误,但是无法转到这个页面
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [login.html], template might not exist or might not be accessible by any of the configured Template Resolvers
解决方案:
在application.yml
里面加上
spring:
thymeleaf:
mode: HTML
encoding: utf-8
cache: false
prefix: classpath:/templates/
就能解决
希望能交流更多技术,关注小白的微信公众号吧。