最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Springboot如何切换默认的Tomcat容器 Springboot切换默认的Tomcat容器代码
时间:2020-06-18 编辑:袖梨 来源:一聚教程网
Springboot如何切换默认的Tomcat容器?本篇文章小编给大家分享一下Springboot切换默认的Tomcat容器代码,代码介绍的很详细,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看。
代码如下
org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-tomcat org.springframework.boot spring-boot-starter-jetty
以上依赖就是将默认的tomcat切换为jetty容器
还可以切换为undertow
org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-tomcat org.springframework.boot spring-boot-starter-undertow
如果这些容器都不满意 ,还可以切换为Netty
这里不引入starter-web,直接引入starter-webflux
org.springframework.boot spring-boot-starter-webflux
这里注意spring-boot版本2.x才可以。
相关文章
- SpringBoot自定义bean绑定解析 10-24
- Javaweb工程运行报错HTTP Status 404解决教程 10-20
- JAVA获取jvm和操作系统相关信息方法 10-20
- BeanFactory和FactoryBean的区别讲解 10-20
- 微信小程序的宿主环境实现教程 10-10
- dispatchEvent解决重叠元素响应事件教程 10-10