Multiple @RequestBody in feign client exception when executing service

956 views Asked by At

I am giving call from User microservice to Account microservice via feign client. I am passing 3 request body in method call. I am getting exception when I am executing user service stating that multiple request body is present in feign call.

@PostMapping("/create)
ResponseEntity<Long> createAccount(@RequestBody List<UserInfo> userInfo, @RequestBody List<AddressInfo> addressInfo, @RequestBody List<OrderInfo> orderInfo);

Is there a limit on number of request body I can send via feign? I just don't want to club all three list under one object and want to send them separately.

Can any one please help me with this?

1

There are 1 answers

0
VAG On

You can't pass multiple Body in HTTP request (see docs). Does your Account microservice really have API that require more than one body?