controller 接受body为application/x-www-form-urlencoded类型的请求

    @RequestMapping(value = "/receive", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    public String receive(@RequestParam Map<String, String> params) throws UnsupportedEncodingException {
        log.info("[receive] 请求入参 params={}", URLDecoder.decode(params.toString(), "UTF-8"));
   	return null;
    }
posted @ 2022-09-29 14:26  237237  阅读(454)  评论(0)    收藏  举报