Below is how my ZUUL configuration looks like.
zuul:
routes:
UserCards-V1:
path: /user/v1/accountholders/*/cards/**
service-id: usercards-v1
strip-prefix: false
UserTransactions-V1_1:
path: /user/v1/accountholders/*/transactions
service-id: usertransactions-v1
strip-prefix: false
UserTransactions-V1_2:
path: /user/v1/accountholders/*/accounts/*/transactions
service-id: usertransactions-v1
strip-prefix: false
UserAccounts-V1:
path: /user/v1/accountholders/*/accounts/**
service-id: useraccounts-v1
strip-prefix: false
UserCardholders-V1:
path: /user/v1/accountholders/**
service-id: usercardholders-v1
strip-prefix: false
The problem that I am having is when I hit the url like this http://localhost:8006/user/v1/accountholders/2/transactions?page= I have a map in my API controller that reads the query params but it comes in as empty {}
And when i hit the url as below:- http://localhost:8006/user/v1/accountholders/2/transactions?page=123. The map comes in as {page=[123]}it works fine.
Can anyone help me with it i need to know that page param is empty or any other parameter that's being passed is empty. If i directly hit my api without Zuul then all works fine. I think its Zuul thats ignoring it and not forwarding it to the api.
This is my API's controller:-
@RequestMapping(value = "/accountholders/{cardHolderId}/transactions", produces = "application/json; charset=utf-8", consumes = "application/json", method = RequestMethod.GET)
@ResponseBody
public TransactionsVO getTransactions(@PathVariable("cardHolderId") final String cardHolderId,
@RequestParam final MultiValueMap<String, String> allRequestParams) {
final String requestTimeStamp = DateUtil.getUTCDate();
iUrlValidator.validate(cardHolderId, null, allRequestParams);
return iTransactionService.getCardHolderTransactionsInfo(cardHolderId, requestTimeStamp, pageNumber, pageSize,
allRequestParams);
}