I'm in the process of converting all my Spring Services to Jersey, when I came across an issue about how to convert the RequestParam's params feature of Spring to Jersey?
@RequestMapping(value = "/earnings", params = "type=csv")
Spring:
@RequestMapping(value = "/earnings", params = "type=csv")
public void earningsCSV() {}
@RequestMapping(value = "/earnings", params = "type=excel")
public void earningsExcel() {}
@RequestMapping("/earnings")
public void earningsSimple() {}
Jersey:
@Path("/earnings")
public void earningsCSV() {}
@Path("/earnings")
public void earningsExcel() {}
@RequestMapping("/earnings")
public void earningsSimple() {}
How to specify the type "csv/excel" in Jersey? Does Jersey even support Filtering Requests based on Param's?
If not, is there any way I can achieve this? I was thinking of a filter which process them and re-directs requests, but I've nearly 70+ services which needs to be addressed this way. So I'll have to end up writing a filter for all of them. Also, It doesn't sound like a clean approach.
Any suggestions would be appreciated. Thanks in advance.