springboot post 对象

@RestController
@RequestMapping("/order")
@Slf4j
public class OrderController {

 

//  Headers  Content-Type: application/json
//  Body
//{"buyerName":"zhangsan","buyerPhone":"18810453678","buyerAddress":"rere","buyerOpenid":"fdasfdaf","orderDetailList":[{"productId":"1533382637167627934","productQuantity":1}]}
    @RequestMapping(value = "/create3", method = RequestMethod.POST ,consumes="application/json;charset=utf-8",produces="application/json;charset=utf-8")
    public  OrderDTO create3(@RequestParam("orderDTO")  OrderDTO orderDTO) throws Exception{
        log.info("request {}",orderDTO);
        return orderService.create(orderDTO);
    }

你可能感兴趣的:(部署)