无法将spring boot应用程序部署到heroku

问题描述 投票:0回答:1

我试图在Heroku上部署我的spring boot应用程序。我将github连接到Heroku并为该应用程序创建clearDB。部署成功后,我转到应用程序。但是在heroku的日志中显示了我2020-02-24T20:00:33.959429+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/auth/signin" host=linkedin-search.herokuapp.com request_id=52208cc6-575e-444b-bb45-c3910d49b175 fwd="134.249.164.109" dyno= connect= service= status=503 bytes= protocol=https

我的Procfile包含以下内容:web: java -jar target/Linkedin_Search-0.0.1-SNAPSHOT.jar我的pom.xml构建部分是:

 <build>
     <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.2.2.RELEASE</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <release>11</release>
                </configuration>
            </plugin>
            <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>copy-dependencies</id>
                            <phase>package</phase>
                            <goals><goal>copy-dependencies</goal></goals>
                        </execution>
                    </executions>
            </plugin>
        </plugins>
    </build>

我按照Heroku开发中心上的教程进行所有操作,但没有任何效果。

java spring spring-boot heroku
1个回答
0
投票

我建议您在GitHub上部署应用,然后使用来自heroku的自动部署。这更容易。总是对我很好。

© www.soinside.com 2019 - 2024. All rights reserved.