调用接口的时候 项目一直报错: org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/thymeleaf/user", template might not exist or might not be accessible by any of the configured Template Resolvers
请问一般什么问题?
调用接口的时候 项目一直报错: org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/thymeleaf/user", template might not exist or might not be accessible by any of the configured Template Resolvers
请问一般什么问题?
如果是使用 spring-boot-starter-thymeleaf,可以添加下列配置在application.properties
spring.thymeleaf.check-template-location=true
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=html
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
spring.thymeleaf.cache=false
8 回答6.5k 阅读
4 回答706 阅读✓ 已解决
2 回答3.4k 阅读
3 回答1.9k 阅读✓ 已解决
1 回答2.2k 阅读✓ 已解决
1 回答2.1k 阅读✓ 已解决
1 回答797 阅读✓ 已解决
对于springboot,解析页面时,默认从resources 中的templates文件夹下寻找界面解析。
并且对于使用thymeleaf模板引擎,它要求写的HTML要严格按照HTML的格式,
如:
单标签一定要有\