springboot关于Tomcat的配置

一:Springboot中关于http请求头过大的处理:

注:在相应的配置文件中配置如下参数:此处以xxx.yml文件为例:

1
2
3
4
5
6
7
8
9

spring:

​ server:

​ tomcat:

​ max-http-header-size : 999999

注:上面的99999为http请求头的容量;

二:Springboot中关于文件上传最大容量处理:

1
2
3
4
5
6
7
8
9

spring:

​ servlet:

​ multipart:

​ max-request-size: 100MB

其他详情用法其自行查阅资料