2020
11-06
11-06
SpringBoot ResponseBody返回值处理的实现
1.SpringBootResponseBody返回值中null值处理@PostMapping(path="/test",produces=MediaType.APPLICATION_JSON_VALUE)publicObjecttest(){JSONObjectjsonObject=newJSONObject();jsonObject.put("test","test");jsonObject.put("testnull",null);ApiResponseVoapiResponseVo=newApiResponseVo();apiResponseVo.setData(jsonObject);apiResponseVo.setStatus(0);returnapiResponseVo;}接口返回(想实现...
继续阅读 >