【发布时间】:2017-04-04 10:00:31
【问题描述】:
我的 Spring-Boot 应用在通过 Eclipse IDE(安装了 S.T.S. 3.8.4)和嵌入式 tomcat 服务器运行时运行良好。
我将其打包为 WAR 并部署到本地 Tomcat 服务器。
访问应用程序时,返回一个空白页面。我在 Tomcat 日志中发现了异常(在 Windows 上,C:\<path-to-tomcat>\logs)尝试解析 Thymeleaf 模板时抛出异常:
2017-04-04 12:33:36.602 ERROR 5724 --- [io-12080-exec-7] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-12080-exec-7] Exception processing template "home": Error resolving template "common/layout", template might not exist or might not be accessible by any of the configured Template Resolvers (template: "home" - line 5, col 7)
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "common/layout", template might not exist or might not be accessible by any of the configured Template Resolvers (template: "home" - line 5, col 7)
at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:865) ~[thymeleaf-3.0.2.RELEASE.jar:3.0.2.RELEASE]
【问题讨论】:
标签: spring tomcat spring-boot war thymeleaf