Error creating bean with name 'com.aebiz.plugins.b2b.common.otherapis.thirdinterface.deliver.plugin.purchase_p2.PurchaseDeliver2ThirdInterfaceApi': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Method has too many Body parameters: public abstract com.aebiz.baseframework4ms.basewebapi.RetDTO com.aebiz.plugins.b2b.common.otherapis.thirdinterface.deliver.plugin.purchase_p2.PurchaseDeliver2ThirdInterfaceApi.updateRemark(java.util.Set,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
接口参数是这样的
RetDTO updateRemark((@RequestBody Set<String> orderRowNums,
@RequestParam("purchaseSapNo") String purchaseSapNo,
String twiceTime,
String remarkType,
String remark)
应该改成这样的
RetDTO updateRemark(@RequestBody Set<String> orderRowNums, @RequestParam("purchaseSapNo") String purchaseSapNo,
@RequestParam(value = "twiceTime",required = false) String twiceTime,
@RequestParam(value = "remarkType",required = false) String remarkType,
@RequestParam(value = "remark",required = false) String remark){
本文档解决了在创建PurchaseDeliver2ThirdInterfaceApi接口时遇到的错误,通过修改方法签名以匹配实际需求,移除多余的body参数并添加@RequestParam注解来规范请求参数。
847

被折叠的 条评论
为什么被折叠?



