1
http://localhost:5000/product?cust_id=1&multi_attribute={"size":["xl","small"],"color":["red","green"]}

It is using multiple multi_attributes. I know how to do it in this way:

size= value1, value2

Also got to know that we can bind the object directly without @RequestParam. But what I have to implement is in the above given format and not getting anything to implement this in search.

Anybody has any idea to implement the last parameter multi_attribute?

dur
  • 15,689
  • 25
  • 79
  • 125
Parvathy
  • 31
  • 1
  • 7
  • It seems that what you got there is not a "multiattribute", is JSON. Take a look a this http://stackoverflow.com/questions/21577782/json-parameter-in-spring-mvc-controller Maybe it helps you. – RubioRic May 08 '17 at 07:07
  • Yes. That is correct RubioRic. If I use UriComponentsBuilder for building the URI , it is giving me the uri as http://localhost:5000/product?cust_id=1&multi_attribute=com.model.MultiAttribute@4f4c88f9. This is how I have set UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(recomm_post_url) .queryParam("cust_id", context.get("cust_id")) .queryParam("multi_attribute", multiAttribute); – Parvathy May 10 '17 at 11:26

0 Answers0