[英]Unable to start spring-boot in jetty and it always defaults to tomcat
即使使用以下配置,也无法在码头启动 spring-boot,什么配置不正确
implementation ('org.springframework.boot:spring-boot-starter-web') {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
}
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
您需要在 build.gradle 中添加以下代码以排除 Tomcat。
configurations {
compile.exclude module: "spring-boot-starter-tomcat"
}
然后添加 Jetty 依赖:
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
这将使用 Jetty 启动您的 Spring Boot 应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.