现在,gradle 是
configurations {
compile.exclude module: "spring-boot-starter-tomcat"
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-redis')
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
compile 'org.springframework.boot:spring-boot-starter-jersey'
compile 'org.springframework.boot:spring-boot-starter-web'
compile('org.springframework.boot:spring-boot-starter-jetty')
}
但是tomcat的依赖还是存在的
最佳答案
请根据 reference 更正在您的 gradle 中排除 Tomcat 时的引号:
configurations {
compile.exclude module: 'spring-boot-starter-tomcat'
}
然后清理并构建项目。
然后确认 Tomcat 依赖项不存在。
关于spring-boot - spring boot 由 jetty 而不是 tomcat 启动,需要做什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53043501/