Spring Boot - Dependency Starter

2020/11/24

starter-tomcat vs starter-web

簡言之,spring-boot-starter-web包含spring-boot-starter-tomcat

下面是spring-boot-starter-web依賴關係層次結構:

如果要排除spring-boot-starter-tomcat依賴:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Ref: spring-boot-starter-tomcat vs spring-boot-starter-web - Stack Overflow



一位有故事的程序員

(Best Regard)

Show Disqus Comments

Post Directory

扫码关注公众号:吹雪
发送 290992
即可立即永久解锁本站全部文章