servicecomb-java-chassis
servicecomb-java-chassis copied to clipboard
GET接口是如何支持类似RequestBody机制的?
在通过Servicecomb发布和启动微服务里面,支持对Get接口,也定义Model class进行参数映射,且mode class支持java validation注解。看起来像Post接口一样。请问Servicecomb源码是在哪里进行处理的?
// 发布Get接口
@RequestMapping(value = {"/apply/apply-list"}, method = {RequestMethod.GET})
public Object queryApplyList(@Valid QueryApplyReq queryApplyReq) throws Exception {
//
}
// Model define
@Data
public class QueryApplyReq extends BaseReq {
@Length(max = 50, message = "operator_id length range is [0, 50]")
@JsonProperty("operator_id")
@ApiModelProperty(name = "operator_id", dataType = "string")
private String operatorId;
@Length(max = 50, message = "approver_id length range is [0, 50]")
@JsonProperty("approver_id")
@ApiModelProperty(name = "approver_id", dataType = "string")
private String approverId;
}
正常springboot 框架这样也可以吧 应该是直接借用的springboot框架的能力