控制器代码为
@SuppressWarnings("unchecked")
@RequestMapping(value = "/abc/test.do", method = RequestMethod.GET)
public ModelAndView getData(@RequestParam(value="qName", required=true) String qName,
HttpServletRequest request,
Model model) {
OverridableHttpRequest myRequest = (OverridableHttpRequest) request;
--overridablehttprequest如下
public class OverridableHttpRequest extends HttpServletRequestWrapper implements
HttpServletRequest {
private Map<String, String> newParams;
private Set<String> removedParams;
public OverridableHttpRequest(HttpServletRequest requestToWrap) {
super(requestToWrap);
this.newParams = new HashMap<String, String>();
this.removedParams = new HashSet<String>();
}
}
我正在升级到SpringBoot2.4.2
暂无答案!
目前还没有任何答案,快来回答吧!