SpringBoot---Servlet容器(Tomcat)配置
1、概述
1.1、Tomcat所有属性 都在org,springframework.boot.autoconfigure.web.ServerProperties配置类中作了定义;
2、替换Tomcat
2.1、SpringBoot默认使用Tomcat作为Servlet容器,如果想使用Jetty或者其他的作为Servlet容器,只需要修改spring-boot-starter-web的依赖即可;
<!-- 将SpringBoot默认的Servlet容器Tomcat换为Jetty -->
<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>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
SpringBoot---Servlet容器(Tomcat)配置的更多相关文章
- 尚硅谷springboot学习26-嵌入式servlet容器自动配置、启动原理
EmbeddedServletContainerAutoConfiguration:嵌入式的Servlet容器自动配置 @AutoConfigureOrder(Ordered.HIGHEST_PREC ...
- springboot(八) 嵌入式Servlet容器自动配置原理和容器启动原理
1.嵌入式Servlet容器自动配置原理 1.1 在spring-boot-autoconfigure-1.5.9.RELEASE.jar => springboot自动配置依赖 jar包下,E ...
- 嵌入式Servlet容器自动配置和启动原理
EmbeddedServletContainerAutoConfiguration:嵌入式的Servlet容器自动配置? @AutoConfigureOrder(Ordered.HIGHEST_PRE ...
- 【串线篇】spring boot嵌入式Servlet容器自动配置原理
EmbeddedServletContainerAutoConfiguration:嵌入式的Servlet容器自动配置? @AutoConfigureOrder(Ordered.HIGHEST_PREC ...
- 4_7.springboot2.x嵌入式servlet容器自动配置原理
概述 Spring Boot对所支持的Servlet Web服务器实现做了建模抽象: Servlet容器类型 WebServer模型接口 WebServer工厂实现类 Tomcat Tomca ...
- Servlet(1)—Servlet容器tomcat和HTTP协议
Servlet容器为JavaWeb应用提供运行时环境,它负责管理Servlet和JSP的生命周期,以及管理他们的共享数据. Servlet容器也称JavaWeb应用容器,或者Servlet/JSP容器 ...
- 对于Servlet、Servlet容器以及一个Servlet容器-Tomcat
Servlet.Servlet容器等内容讲解 转载自http://blog.csdn.net/iAm333 对于Servlet.Servlet容器以及一个Servlet容器-Tomcat这些概念讲解的 ...
- Servlet容器Tomcat中web.xml中url-pattern的配置详解[附带源码分析]
目录 前言 现象 源码分析 实战例子 总结 参考资料 前言 今天研究了一下tomcat上web.xml配置文件中url-pattern的问题. 这个问题其实毕业前就困扰着我,当时忙于找工作. 找到工作 ...
- springboot内置tomcat配置虚拟路径
在Springboot中默认的静态资源路径有:classpath:/METAINF/resources/,classpath:/resources/,classpath:/static/,classp ...
- springboot(七) 配置嵌入式Servlet容器
github代码地址:https://github.com/showkawa/springBoot_2017/tree/master/spb-demo/spb-brian-query-service ...
随机推荐
- GIS网络分析
https://wenku.baidu.com/view/297ec6a90029bd64783e2cb2.html 缓冲区分析 点线面的数据分析 分布式存储与分析 并行计算 #分布式存储与并行计算# ...
- 秒杀Servlce接口设计
秒杀Servlce接口设计 1.创建service包,创建SecKillServlce业务接口 SecKillServlce.Java package org.secKill.service;/** ...
- 调试 & 常数优化:我有特别的 debug 技巧
rxz 的调试技巧(https://www.zhihu.com/question/60719584/answer/179363450): #define DEBUG printf("Pass ...
- [CSP-S模拟测试]:建设城市(city)(组合数学+容斥)
题目传送门(内部题8) 输入格式 一行三个整数$n,m,k$. 输出格式 一行一个整数表示答案.对$998244353$取模. 样例 样例输入 3 7 3 样例输出 数据范围与提示 对于10%的数据, ...
- 用flask写一个简单的接口
用falsk写一个简单的接口,这个接口的数据本来是爬虫爬取的数据,但是今天只写一个flask接口,数据就用测试数据好了. import random import re import time imp ...
- vue2.0 之 douban (五)创建cell,media-cell组件
1.组件cell 这里的cell分为三种样式,左侧带图标,不带图标,以及左侧带竖线的cell. 每一个组件都有一个底部边框: 这里我们采用了移动端1px像素问题的解决方法:父级元素设置相对定位,构建1 ...
- ORA-00020: maximum number of processes (800) exceeded
[oracle@db04-1 ~]$ sqlplus -prelim / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on 星期四 8月 31 ...
- Java日期处理类的相关使用
java常用类-java日期处理类 Date类 Date类是jdk给我们提高的标准日期类,在java.util包下: 示例代码: import java.util.Date; public class ...
- Window 相关命令
net user Administrator /Active:Yes NET USER 用于创建和修改计算机上的用户帐户.当不带选项使用本命令时,它会列出计算机上的用户帐户.用户帐户的信息存储在用户帐 ...
- Codeforces Round #285 (Div. 2)C. Misha and Forest(拓扑排序)
传送门 Description Let's define a forest as a non-directed acyclic graph (also without loops and parall ...