Java 访问Heroku端点-SpringBootApp 503服务不可用

Java 访问Heroku端点-SpringBootApp 503服务不可用,java,spring-boot,heroku,Java,Spring Boot,Heroku,我现在在Heroku部署了一个springBoot应用程序,我想对这个应用程序做一些请求,但是我收到一条503错误消息 在我的本地应用程序中,我使用下一个url执行get请求: 在Heroku中,我使用下一个url: . 我不太确定如何向部署在Heroku中的应用程序发出请求—构建成功了。我只是在github和Heroku中提交了我的源代码,我必须在能够执行某些请求之前再做一步 以下是日志: 2020-03-15T22:41:18.739435+00:00 heroku[web.1]: Stat

我现在在Heroku部署了一个springBoot应用程序,我想对这个应用程序做一些请求,但是我收到一条503错误消息

在我的本地应用程序中,我使用下一个url执行get请求:

在Heroku中,我使用下一个url: . 我不太确定如何向部署在Heroku中的应用程序发出请求—构建成功了。我只是在github和Heroku中提交了我的源代码,我必须在能够执行某些请求之前再做一步

以下是日志:

2020-03-15T22:41:18.739435+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-15T22:41:24.686661+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=25003 $JAVA_OPTS -jar target/backend-coding-challenge-1.0-SNAPSHOT.jar`
2020-03-15T22:41:26.617949+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-15T22:41:26.596700+00:00 heroku[web.1]: Process exited with status 1
2020-03-15T22:41:26.457261+00:00 app[web.1]: Create a Procfile to customize the command used to run this process: https://devcenter.heroku.com/articles/procfile
2020-03-15T22:41:26.469191+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2020-03-15T22:41:26.472555+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 
2020-03-15T22:41:26.557238+00:00 app[web.1]: no main manifest attribute, in target/backend-coding-challenge-1.0-SNAPSHOT.jar
2020-03-15T22:46:51.520471+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=heroku-boot-app-chall.herokuapp.com request_id=5d91aac3-05d9-4075-83ce-1eea931f5a32 fwd="94.130.167.85" dyno= connect= service= status=503 bytes= protocol=https
2020-03-15T22:46:52.053784+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/suggestions?q=Londo&latitude=43.70011&longitude=-79.4163" host=heroku-boot-app-chall.herokuapp.com request_id=b9ba4950-1f83-4959-bc79-901a96d5fd02 fwd="94.130.167.85" dyno= connect= service= status=503 bytes= protocol=https

谢谢

最后,我必须创建一个包含以下信息的Procfile:

web: java -Dserver.port=$PORT -jar target/backend-coding-challenge-1.0-SNAPSHOT.jar
并将下一个插件添加到pom.xml:

<build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <mainClass>com.heroku.CityAutocompleteService</mainClass>
        </configuration>

        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

org.springframework.boot
springbootmaven插件
com.heroku.CityAutocompleteService
重新包装

日志中有什么内容吗?我已经更新了日志。