【发布时间】:2016-08-28 19:07:36
【问题描述】:
我有一个使用 Thymeleaf 作为视图引擎的 Spring-boot 应用程序,我想使用部署的 Jar 之外的文件夹作为 Thymeleaf 模板的来源,我设置了变量:
spring.thymeleaf.prefix=classpath:/templates/
“/templates/”在带有 HTML 文件的 Jar 旁边,但我收到 Thymeleaf 无法解析模板的异常,我尝试了许多配置,例如:
spring.thymeleaf.prefix=classpath:templates/
spring.thymeleaf.prefix=classpath:templates
等等,并非没有任何作用。我做错了什么,甚至有可能?
【问题讨论】:
标签: java spring spring-boot thymeleaf