Springboot中的Web服务Tomcat改为Jetty

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 启动文件

posted @ 2020-03-04 12:59  九角冰山  阅读(648)  评论(0)    收藏  举报