Resolved [org.springframework.web.bind.MissingServletRequestParameterException: Required List parame

2023年8月3日09:09:48

问题:Resolved [org.springframework.web.bind.MissingServletRequestParameterException: Required List parameter ‘customerNoList’ is not present]
原因:请求体过大,超出了tomcat限制的2M大小
解决方案:使用的是springboot内嵌的tomcat,通过在application.properties 或者 bootstrap.yaml 中修改配置

server:
  tomcat:
  	# -1 表示不限制请求大小
  	# 单位是字节 byte
    max-http-form-post-size: -1

使用的springboot版本:2.3.9.RELEASE,之前查询的都是max-http-post-size这个属性,一直不起效,差点怀疑人生
该属性在spring-boot-autoconfigure-2.3.9.RELEASE.jar 中的org.springframework.boot.autoconfigure.web.ServerProperties.Tomcat#maxHttpFormPostSize

  • 作者:hello_zzw
  • 原文链接:https://blog.csdn.net/zzw_17600691357/article/details/117732381
    更新时间:2023年8月3日09:09:48 ,共 500 字。