Spring boot切换Servlet容器
切换Servlet容器
Spring boot默认配置Tomcat作为Servlet容器
引入web模块,默认使用嵌入式的Tomcat
可以切换Jetty、Undertow
默认配置
Pom文件,查看依赖关系
默认使用Tomcat
因为,Web引入了Tomcat的启动器
切换Jetty
Pom文件,排除Tomcat启动器依赖
在依赖关系,右键可以排除依赖
<!-- 引入web模块 -->
<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>
引入Jetty启动器
<!--引入其他的Servlet容器-->
<dependency><artifactId>spring-boot-starter-jetty</artifactId><groupId>org.springframework.boot</groupId>
</dependency>
切换undertow
引入undertow启动器
<!--引入其他的Servlet容器-->
<dependency><artifactId>spring-boot-starter-undertow</artifactId><groupId>org.springframework.boot</groupId>
</dependency>
Spring boot切换Servlet容器相关推荐
- 熵增学院-Anders-剑走偏锋,了解Spring Boot内部Servlet容器
2019独角兽企业重金招聘Python工程师标准>>> 还记得大明湖畔的servlet吗?其实Spring Boot支持内嵌的Tomcat, Jetty和Undertow服务器,多数 ...
- Spring boot配置Servlet容器
配置Servlet容器 Spring boot默认使用Tomcat,作为Servlet容器 也支持Jetty.Undertow作为Servlet容器 Jetty 适合开发长连接应用 长连接,表示一直进 ...
- Spring boot嵌入式Servlet容器定制器
修改Servlet配置 可以通过配置文件修改 也可以编写一个嵌入式Servlet容器定制器 EmbeddedServletContainerCustomizer 在自定义配置中,添加组件 Embedd ...
- spring boot中servlet启动原理
启动过程及原理 1 spring boot 应用启动运行run方法 StopWatch stopWatch = newStopWatch();stopWatch.start();Configurabl ...
- Spring Boot 容器选择 Undertow 而不是 Tomcat Spring Boot 内嵌容器Unde
Spring Boot 内嵌容器Undertow参数设置 配置项: # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 # 不要设置过大,如果过大,启动 ...
- Spring Boot配置Tomcat容器、Jetty容器、Undertow容器
Spring Boot配置Tomcat容器.Jetty容器.Undertow容器 Tomcat.Jetty.Undertow Tomcat概述 Jetty概述 Undertow概述 Spring Bo ...
- Spring Boot 注册 Servlet 的三种方法,真是太有用了!
2019独角兽企业重金招聘Python工程师标准>>> 本文栈长教你如何在 Spring Boot 注册 Servlet.Filter.Listener. 你所需具备的基础 什么是 ...
- Spring Boot整合Servlet,Filter,Listener,访问静态资源
目录 Spring Boot整合Servlet(两种方式) 第一种方式(通过注解扫描方式完成Servlet组件的注册): 第二种方式(通过方法完成Servlet组件的注册) Springboot整合F ...
- Spring Boot切换其他嵌入式的Servlet容器
Spring Boot默认支持: Tomcat(默认使用) <dependency><groupId>org.springframework.boot</groupId& ...
最新文章
- 【SpringBoot】在IOC之外的类中使用IOC内部的Bean
- arduino通过串口监视器读取一行字符
- 「大数据成神之路」第四版更新完毕
- python字符串怎么加绝对值_每日一练 | Python绝对值有哪些实例?
- 2022年iOS面试题简答题
- matlab设计高频滤波器
- 云主服务器排行榜_国内云服务器排名
- FreeRtos 任务优先级和中断优先级
- 听说想当黑客的都玩过这个Monyer游戏
- 阿里巴巴达摩院夺得首届“马栏山杯”国际音视频算法优化大赛【画质损伤修复赛道】冠军
- GNU GRUB手册之安装(一)
- DFS搜索和输出所有路径
- 沈定刚,雷柏英,李超 | Cell Press Live:人工智能在医学影像中的应用
- NC19822 我不爱她 kmp+hash
- 江苏2020高中计算机学业水平,2020江苏高中学业水平测试时间安排表
- 双目视觉 XYZ求解
- Java实现批量替换文本文档中内容
- 转载:传说中的T检验
- 解决电脑能上网不能登陆QQ-已测试并解决
- sublime text3使用卡顿,代码提示卡顿终极解决办法