如何禁止spring对RequestBody默认进行urlencode?
anel 2019-03-08 12:21:14 客户端post内容:
{"name":"abc_def","num":123}
服务端:
@RequestMapping(value = "/post", method = RequestMethod.POST)
public void post(@RequestBody String str, HttpServletResponse response) throws IOException{
System.out.println(str);
PrintWriter out = response.getWriter();
out.write("ok");
}
//str的内容:
%7B%22name%22%3A%22abc_def%22%2C%22num%22%3A123%7D=
这里系统已经对RequestBody做了urlencode,虽然可以用urldecode还原,但我希望系统不做urlencode,不知如何设置?