【问题标题】:Springboot 2 RESTful application deployed to heroku using ProcfileSpringboot 2 RESTful 应用程序使用 Procfile 部署到 heroku
【发布时间】:2020-04-25 03:57:39
【问题描述】:

我尝试了许多配置来使用 procfile 将我的 Restful Springboot 2 应用程序部署到 heroku,但无济于事。我在这里尝试了几个建议/解决方案。

过程文件: web: java $JAVA_OPTS -Dspring.profiles.active=stage -cp target/classes:target/libs/* com.rabbittab.RestFulApp

Heroku 日志: 2020-04-24T14:57:59.344561+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/"

非常感谢您对此提供的任何帮助。

【问题讨论】:

  • 我认为你应该提供 target/dependency/* 而不是 target/libs/*

标签: spring-boot heroku procfile


【解决方案1】:

-Dserver.port=$PORT 添加到 Procfile。
我认为问题在于您的应用没有绑定到 Heroku 提供的端口。

【讨论】:

    猜你喜欢
    • 2012-10-22
    • 2017-01-31
    • 2013-03-25
    • 2012-07-16
    • 2014-12-20
    • 2022-10-16
    • 2020-05-11
    • 2012-08-17
    相关资源
    最近更新 更多