Springboot中的Web服务Tomcat改为Jetty

╄→гoц情女王★ 提交于 2020-03-04 14:00:17

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!