Java Can';不要部署到Heroku。at=错误代码=H10 desc=";“应用程序崩溃”;

Java Can';不要部署到Heroku。at=错误代码=H10 desc=";“应用程序崩溃”;,java,spring,heroku,Java,Spring,Heroku,我正在尝试将我的应用程序部署到Heroku。我的应用程序崩溃了。这是错误: at=error code=H10 desc="App crashed" method=GET path="/" host=smartmed2017.herokuapp.com request_id=3e8cc17e-320b-4230-bdbb- 3a751e3477de fwd="195.19.247.73" dyno= connect= service= status=503 bytes= protocol=h

我正在尝试将我的应用程序部署到Heroku。我的应用程序崩溃了。这是错误:

at=error code=H10 desc="App crashed" method=GET path="/" 
host=smartmed2017.herokuapp.com request_id=3e8cc17e-320b-4230-bdbb-
3a751e3477de fwd="195.19.247.73" dyno= connect= service= status=503 
bytes= protocol=https

2017-06-01T11:17:42.380548+00:00 heroku[router]: at=error code=H10 
desc="App crashed" method=GET path="/favicon.ico" 
host=smartmed2017.herokuapp.com request_id=9ab6574e-3fed-4af3-9cae-
0651e13d9112 fwd="195.19.247.73" dyno= connect= service= status=503 
bytes= protocol=https
和往常一样,但我认为这个问题的原因可能不同

这是主课

@Controller
@SpringBootApplication
public class Main
{
    public static void main(String[] args) throws Exception {
        SpringApplication.run(Main.class, args);
    }

    @RequestMapping("/")
    String index() {
        return "index";
    }
}
程序文件:

web: java -Dserver.port=$PORT -jar target/untitled-1.0-SNAPSHOT.jar

H10错误意味着:崩溃的web dyno或web dyno上的引导超时将出现此错误。 据

  • 将webapp runner添加到pom.xml中的插件部分

     <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.3</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals><goal>copy</goal></goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>com.github.jsimone</groupId>
                                <artifactId>webapp-runner</artifactId>
                                <version>8.5.11.3</version>
                                <destFileName>webapp-runner.jar</destFileName>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    
    
    org.apache.maven.plugins
    


    你能在github上共享项目吗?

    重启dyno并从JVM捕获错误消息后,你能运行heroku logs-t吗?@codefinger。感谢您的回复您发布的日志不够详细。尝试从头复制日志,让我们看看可能发生了什么。如果有数据库连接到localhost,请检查并更改端口。您是否已将webapp runner添加到pom.xml中?@awotunbolakunleoladeji我尚未使用任何数据库。我没有这个。谢谢你的帮助@我没有webapp runner,我的意思是你会看到logfile.txt。更改后会出现错误