# 总结
1. 怎么排除依赖、替换依赖、添加依赖
2. 内嵌服务器
## 内嵌tomcat
exclusion标签排除依赖 :
```
<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>
</exclusion>
</dependency>
```
去掉之后会报:
Process finished with exit code 0
## 内嵌其他服务器
springboot内嵌:
1. tomcat: springboot 默认
2. jetty:比tomcat更轻
3. undertow:
如果想用别的服务器,就替换掉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>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
```