如果使用request.getParameter()或者定义参数名的方式获取不到前端发送过来的参数时,
需要设置Content-Type为:application/x-www-form-urlencoded
还有一种情况也与Content-Type有关:
浏览器直接访问某个SpringMVC的Controller接口时,可以访问该接口并得到返回值,而使用post请求访问时却始终报400,
这时候需要在访问时加上Content-Type为:application/x-www-form-urlencoded。