How to develop a REST Webservice method which accepts multiple URIs for example
If we have a method
@RequestMapping(/add)
public Response add(@RequestParam List elements){
}
The method above serves for URL https://local host:8080/add
I have asked in interview how do we have a single Webservice which serves multiple URIs which I was not able to answer as I thought we should have unique URIs for each method
A follow up to this how do we have a method which returns the format whatever choosen (JSON, XML, PLAIN TEXT) from postman client.