【问题标题】:Spring Boot not starting Jetty when using bootRun使用 bootRun 时 Spring Boot 未启动 Jetty
【发布时间】:2014-08-08 16:07:22
【问题描述】:

在我们当前的应用程序中,我们希望在 Spring Boot 应用程序中使用 Jetty 而不是 Tomcat。正如我在文档中读到的,不包括 tomcat 并引入 Jetty 就足够了。

build.gradle

dependencies {
    compile("org.springframework.boot:spring-boot-starter-web") {
        exclude module: "spring-boot-starter-tomcat"
    }
    compile("org.springframework.boot:spring-boot-starter-jetty")
}

但是当我尝试使用以下方式运行应用程序时:

# gradle bootRun

Tomcat 确实消失了,但 Jetty 没有启动,应用程序只是因任何明显的错误而终止。关于我做错了什么的任何提示?

【问题讨论】:

    标签: spring jetty spring-boot


    【解决方案1】:

    使用 Boot 1.1.0.RELEASE 非常适合我。

    您需要使用 --info(--debug) 提示运行 Gradle 命令以获取更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-04-24
      • 2014-06-30
      • 2023-03-07
      • 2019-02-05
      • 2019-01-22
      • 2022-07-05
      • 2015-11-01
      • 1970-01-01
      相关资源
      最近更新 更多