io.undertow.server.RequestTooBigException: UT000020 Connection terminated as request was larger than xxxx
修改yaml文件中关于undertow的配置项
server:
undertow:
# HTTP POST请求最大的大小
# 默认0,无限制
max-http-post-size: ${SERVER_UNDERTOW_MAX_HTTP_POST_SIZE:2GB}
修改后依旧无效,请检查spring.servlet.multipart下的配置
如果存在max-file-size配置,则undertow中配置的值就会失效,会以该max-file-size为准
spring:
servlet:
multipart:
# 文件最大限制
max-file-size: ${MEMBER_AVATAR_MAX_FILE_SIZE:2048MB}