SpringBoot 容器相关配置(Tomcat,Jeety,Undertow)

本文介绍了如何在SpringBoot应用中配置不同的内置服务器容器,包括从properties文件配置Tomcat,到如何移除Tomcat并添加Jetty或Undertow,以及这些容器的配置文件设置。
摘要由CSDN通过智能技术生成

SpringBoot 容器相关配置

1、tomcat容器

在SpringBoot中自带的容器是tomcat,所以说在建SpringBoot项目时就已经带有了tomcat容器

1、properties文件配置

# 配置服务器启动端口号
server.port=8088
# 配置上下文路径
server.servlet.context-path=/msfh
# 配置tomcat Url 编码
server.tomcat.uri-encoding=UTF-8

2、jetty容器

1、移除tomcat容器

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <!--移除tomcat容器-->
    <excl
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值