【发布时间】: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