问题: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