这个问题用中文搜永远没答案,英文搜索第一条就是答案。。(还是坚持学好英文吧)
https://stackoverflow.com/questions/33796218/content-type-application-x-www-form-urlencodedcharset-utf-8-not-supported-for/38252958#38252958
The problem is that when we use application/x-www-form-urlencoded, Spring doesn't understand it as a RequestBody. So, if we want to use this we must remove the @RequestBody annotation. Then try the following: @RequestMapping(value = "/{email}/authenticate", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = {MediaType.APPLICATION_ATOM_XML_VALUE, MediaType.APPLICATION_JSON_VALUE}) public @ResponseBody Representation authenticate(@PathVariable("email") String anEmailAddress, MultiValueMap paramMap) throws Exception { if(paramMap == null && paramMap.get("password") == null) { throw new IllegalArgumentException("Password not provided"); } return null; } Note that removed the annotation @RequestBody