可以通过自定义一个dataBinder 然后替换默认的dataBinder来实现
首先先定义一个dataBinder
package com.danbro.gmall.common.utils.dataBinder;
import com.danbro.gmall.common.utils.util.StringTransferUtil;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyValue;
import org.springframework.web.bind.ServletRequestDataBinder;
import javax.servlet.ServletRequest;
import java.util.LinkedList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
...阅读原文