1.打开在pom.xml文件中
2.排除tomcat依赖 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>
3.添加Jetty依赖 spring-boot-starter-jetty
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jetty</artifactId> </dependency>
ok 启动文件
来源:https://www.cnblogs.com/nineberg/p/12408852.html