记录一下spring mvc接收复杂的json传参
@PostMapping("/createGrayPublish")
@ResponseBody
public Object createGrayPublish(Long sheetId, @RequestBody CreateStrategyModel createStrategyModel) throws ServiceException{
try {
System.out.println(createStrategyModel);
return renderSuccess(null);
} catch (Exception e) {
logger.error("DeviceController createGrayPublish Fail {} {}", sheetId, JSON.toJSONString(createStrategyModel), e);
throw convertToServiceException(ErrCode.SYSTEM_ERROR);
}
}
postman截图如下
