Java Heroku春季启动

Java Heroku春季启动,java,spring-boot,heroku,Java,Spring Boot,Heroku,我试图在Heroku上运行我的Spring Boot应用程序。应用程序正确启动,但启动后立即崩溃,出现以下错误: 2019-03-19T11:45:28.343758+00:00 app[web.1]: 2019-03-19 11:45:28.343 INFO 4 --- [ main] main.Application : Started Application in 23.503 seconds (JVM running

我试图在Heroku上运行我的Spring Boot应用程序。应用程序正确启动,但启动后立即崩溃,出现以下错误:

2019-03-19T11:45:28.343758+00:00 app[web.1]: 2019-03-19 11:45:28.343  INFO 4 --- [           main] main.Application                         : Started Application in 23.503 seconds (JVM running for 24.505)
2019-03-19T11:46:24.818535+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/api/ping/" host=fill-it.herokuapp.com request_id=b6fea897-b436-4918-bc6f-3cde7e4f94aa fwd="5.184.28.91" dyno= connect= service= status=503 bytes= protocol=https
2019-03-19T11:46:32.330719+00:00 heroku[web.1]: State changed from starting to crashed
2019-03-19T11:46:32.173577+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
2019-03-19T11:46:32.173731+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-03-19T11:46:32.312711+00:00 heroku[web.1]: Process exited with status 137
2019-03-19T11:46:32.734743+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fill-it.herokuapp.com request_id=5802be29-5937-4d0f-93fb-7a01b4972d9e fwd="5.184.28.91" dyno= connect= service= status=503 bytes= protocol=https
2019-03-19T11:46:33.049778+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/api/ping/" host=fill-it.herokuapp.com request_id=4c7eff04-ce3a-4a63-b7bf-312b44658e40 fwd="5.184.28.91" dyno= connect= service= status=503 bytes= protocol=https

有人遇到过类似的问题吗?

请确保您的
Procfile
在java命令中有
-Dserver.port=$port

您是否有
Procfile
,或者您是否依赖于deafult命令?您可能需要在某处添加
-Dserver.port=$port
。我有Procfile,但没有此属性。现在就像一个符咒。谢谢!