novel-plus icon indicating copy to clipboard operation
novel-plus copied to clipboard

front模板配置问题

Open Piscen opened this issue 3 years ago • 2 comments

prod环境下的jar包形式部署时,需要复制templates文件夹到jar文件的相同目录下。

Piscen avatar Nov 03 '21 08:11 Piscen

按要求做了以后在服务器报错,Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause

Piscen avatar Nov 03 '21 08:11 Piscen

配置如下: #静态文件路径配置 resources: static-locations: file:${user.dir}/templates/${templates.name}/static/ #thymeleaf模版路径配置 thymeleaf: prefix: file:${user.dir}/templates/${templates.name}/html/ suffix: .html mode: LEGACYHTML5 cache: false

Piscen avatar Nov 03 '21 08:11 Piscen