啊哈,找到原因了。
我也有
compile("org.springframework.boot:spring-boot-starter-websocket")依赖,也依赖spring-boot-starter-tomcat。Gradle依赖项输出使我误认为这
spring-boot-starter-web是Tomcat仍然存在的原因。
我必须添加以下内容:
compile("org.springframework.boot:spring-boot-starter-websocket") { exclude module: "spring-boot-starter-tomcat"}经验教训是,当您要排除某些内容时,请仔细检查所有依赖项,以确保将其从所有位置排除。gradle依赖输出可以得到改进以减少误导…



