org.thymeleaf.exceptions.TemplateInputException: Error resolving template “user/login”, template might not exist or might not be accessible by any of the configured Template Resolvers…
1.配置
spring.thymeleaf.cache=false
spring.thymeleaf.servlet.content-type=text/html
spring.thymeleaf.enabled=true
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.mode=HTML
spring.thymeleaf.prefix = classpath:/templates/
spring.thymeleaf.suffix = .html
2.request
@RequestMapping(value = "/403", method = RequestMethod.GET)
public String forbidden() {
return "error/403";//前面务必没有/
}
3.pom build添加
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>