调用接口的时候 项目一直报错: 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
15 回答8.4k 阅读
8 回答6.2k 阅读
3 回答3.6k 阅读✓ 已解决
1 回答4k 阅读✓ 已解决
3 回答6k 阅读
3 回答2.6k 阅读✓ 已解决
3 回答2.2k 阅读✓ 已解决
对于springboot,解析页面时,默认从resources 中的templates文件夹下寻找界面解析。
并且对于使用thymeleaf模板引擎,它要求写的HTML要严格按照HTML的格式,
如:
单标签一定要有\