首页 > 编程语言 > 详细

20、springboot——使用其他Servlet容器

时间:2020-03-21 17:43:04      阅读:61      评论:0      收藏:0      [点我收藏+]

使用其他Servlet容器

 

-Jetty(长连接)
-Undertow(不支持jsp)

 

技术分享图片

 

 替换为其他嵌入式Servlet容器

 技术分享图片

 
默认支持:
Tomcat(默认使用)

 

Jetty:

技术分享图片
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <exclusions>
        <exclusion>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <groupId>org.springframework.boot</groupId>
        </exclusion>
    </exclusions>
</dependency>

<!--引入其他的Servlet -->
<dependency>
     <artifactId>spring‐boot‐starter‐jetty</artifactId>
     <groupId>org.springframework.boot</groupId>
</dependency>
技术分享图片

 

 

Undertow:

技术分享图片
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <exclusions>
        <exclusion>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <groupId>org.springframework.boot</groupId>
        </exclusion>
    </exclusions>
</dependency>

<!--引入其他的Servlet -->
<dependency>
     <artifactId>spring‐boot‐starter‐undertow<</artifactId>
     <groupId>org.springframework.boot</groupId>
</dependency>
技术分享图片

 

右键排除依赖

技术分享图片

20、springboot——使用其他Servlet容器

原文:https://www.cnblogs.com/lyh233/p/12539869.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!