spring mvc get请求也可以接受DTO对象,比如:url上面你还是将参数&符号连接起来,并自动封装进一个DTO对象里。
只有@RequestBody注解spring mvc才会从http body里去拿数据。
默认不填注解的参数都会从url上面去拿。
@ApiOperation(value = "查询卡券详情接口", consumes = "application/x-www-form-urlencoded") @RequestMapping(value = "/detail", method = RequestMethod.GET) public ProfitCouponDetailDTO queryDetail(@Valid CouponDetailQueryDTO queryDTO) { logger.info("查询卡券详情入参:[{}]", queryDTO); String offerType = queryDTO.getOfferType(); if (isNotCouponOrGP(offerType)) { throw new ParammeterException("offer类型错误"); }
转载于:https://www.cnblogs.com/panxuejun/p/7554287.html
相关资源:各显卡算力对照表!