【发布时间】:2015-04-02 07:57:06
【问题描述】:
我正在开发一个使用 Thymeleaf 作为模板引擎的 Spring Boot 项目。我正在这个项目上设置 Swagger,所以我希望能够在我的 Thymeleaf 内容旁边提供静态内容。
“example.com/help”应该返回一个模板。
“example.com/docs”应该返回静态内容。
目前:
@RequestMapping("/docs")
public String index() {
return "index.html";
}
返回这个:
org.thymeleaf.exceptions.TemplateInputException:错误解决 模板“index.html”,模板可能不存在或可能不存在 任何已配置的模板解析器均可访问
我不希望 Thymeleaf 解决这条路径。
【问题讨论】:
标签: spring-boot thymeleaf