springboot改用jetty的方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lzc4869/article/details/79817511

一、修改默认配置

<dependencies>
    <!-- spring-boot使用jetty容器配置begin -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <!-- 排除默认的tomcat,引入jetty容器. -->
        <exclusions>
           <exclusion>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-tomcat</artifactId>
           </exclusion>
        </exclusions>
    </dependency>
    <!-- jetty 容器. -->
    <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-jetty</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <!-- spring-boot使用jetty容器配置end -->
</dependencies>

猜你喜欢

转载自blog.csdn.net/lzc4869/article/details/79817511