【发布时间】:2022-01-18 17:02:14
【问题描述】:
我尝试在 Heroku 上部署应用程序,但在连接 ClearDB mySQL 后出现错误 500。
heroku 日志:
2022-01-18 18:09:20.331 ERROR 4 --- [io-57013-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause
2022-01-18T18:09:20.332252+00:00 app[web.1]:
2022-01-18T18:09:20.332253+00:00 app[web.1]: org.thymeleaf.exceptions.TemplateInputException: Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers
【问题讨论】:
-
欢迎来到 Stack Overflow。 HTTP 500 是一般的服务器端错误消息。它本身并没有告诉我们任何有用的信息。每当您看到这一点时,您的第一步应该是检查您的错误日志以获取更多详细信息。在 Heroku 上,您可以通过运行
heroku logs来做到这一点。 -
@Chris,谢谢,但错误 4[io-57013-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in带有路径 [] 的上下文抛出异常 [请求处理失败;嵌套异常是 org.thymeleaf.exceptions.TemplateInputException:解析模板时出错 [home],模板可能不存在或可能无法被任何已配置的模板解析器访问],根本原因。 我的 home.html 是找到默认的 src/main/resources/Templates/home.html 和 thymeleaf 有连接 thymeleaf.org"> 。我在这里没有看到问题。
-
您可能看不到问题,但这就是您在这里提出问题的原因。其他人可能会看到你错过的东西。请edit 将您的问题作为代码块以及之前可能出现的任何其他错误消息。
-
@Chris,非常感谢。编辑了问题:)
标签: java mysql spring-boot heroku cleardb