HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/json; charset=utf-8");
if (userinfo == null) {
return new ResponseEntity<String>(headers, HttpStatus.NOT_FOUND);
}
return new ResponseEntity<String>(userinfo.toJson(), headers, HttpStatus.OK);
}
@RequestMapping(headers = "Accept=application/json")
@ResponseBody
public ResponseEntity<String> listJson() {