序列化泛型
String result = "{}";
BaseResult<String> accountResult = JSON.parseObject(result,new TypeReference<BaseResult<String>>() {});
Response处理返回值
default ResponseEntity<String> handleAjaxJsonResponse(Object content) {
HttpHeaders responseHeaders = new HttpHeaders();
responseHeaders.set("Content-Type", "application/json; charset=UTF-8");
// DisableCircularReferenceDetect来禁止循环引用检测
return new ResponseEntity<>(JSONObject.toJSONString(content, SerializerFeature.DisableCircularReferenceDetect),
responseHeaders, HttpStatus.OK);
}