springcloud feign请求时报错 Request header is too large

时间:2025-03-21 08:58:00
: Request header is too large
	at .(:111)
	at .(:268)
	at .http11.(:1009)
	at $(:672)
	at $(:1502)
	at $(:1458)
	at (:1142)
	at $(:617)
	at $(:61)
	at (:745)

原因:
接口调用时,请求头过大导致。
请求头超过了tomcat的限值。本来post请求是没有参数大小限制,但是springboot内置服务器有自己的默认大小。

加上如下配置:

-http-header-size=10485760#10M