去掉responsebody改为返回ResponseEntity
@RequestMapping("/map")
public ResponseEntity<Map<String,Object>> ds(){
Map<String,Object> map = new HashMap<String,Object>();
map.put("1", "2");
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.TEXT_PLAIN);
return new ResponseEntity<Map<String, Object>>(map, headers, HttpStatus.OK);
}