更新时间:2021-08-27 23:00:37
我在尝试创建最小的 spring-boot 应用程序时遇到了同样的问题.我已经将 heroku 的 java-getting-started 实现与我的进行了比较,发现了这个很好的修复.只需将此添加到 src/main/resources/application.properties
I had the same issue trying to create a minimal spring-boot application. I've compared heroku's java-getting-started implementation with mine and found this nice fix. Just add this to src/main/resources/application.properties
server.port=${PORT:5000}