使用Procfile将Springboot 2 RESTful应用程序部署到heroku

时间:2020-04-24 14:59:50

标签: spring-boot heroku procfile

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

Procfile: 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="/"

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

1 个答案:

答案 0 :(得分:1)

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