我正在尝试使用 cxf 实现发送发布请求。但我得到 InjectionUtils - Parameter Class SizeQuantityBean has no constructor with single String parameter, static valueOf(String) or fromString(String) methods
绑定(bind)类时出错。
我发送请求的代码:
sellerService.register(sellerBean);
执行:
@Path(BASE_PATH + "/register")
@POST
@Produces({MediaType.APPLICATION_JSON})
BaseBean register(@QueryParam("") SellerBean sellerBean){
...
...
}
SellerBean
类有 SizeQuantityBean
的列表.如何解决这种冲突?
最佳答案
您是否尝试过删除 @QueryParam
注释,因为您的请求是 POST,所以您不应该使用标签正文。
关于data-binding - InjectionUtils - 参数类没有构造函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18651789/