Unable to start spring-boot in jetty even with the following configuration, what is not being configured properly
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'
You need to add below code in your build.gradle to exclude Tomcat.
configurations {
compile.exclude module: "spring-boot-starter-tomcat"
}
and then to add Jetty dependecy:
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
And this will start your Spring Boot app with Jetty.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.