Springboot学习(一)
使用undertow容器替换tomcat
maven
<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-undertow</artifactId>
</dependency>
gradle
configurations {
compile.exclude module: 'spring-boot-starter-tomcat'
}
dependencies {
compile ('org.springframework.boot:spring-boot-starter-undertow')
}
[注1]:若出现8080被占用但并无进程占用的情况,可以尝试关闭java进程。
[注2]:若出现错误感谢指正。