记录一下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截图如下

spring mvc接收json传参,使用postman模拟数据

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-10-26
  • 2022-12-23
  • 2021-08-07
  • 2021-11-16
  • 2021-09-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案