79482310

Date: 2025-03-03 22:59:00
Score: 0.5
Natty:
Report link

If there is no way to do this with Jersey is there a way to do it with any other frame work?

Spring is capable of achieving this desired mapping: https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-requestmapping.html#mvc-ann-requestmapping-params-and-headers

This can be accomplished using the params element of the request mapping annotation. For example:

@GetMapping(value = "/tagSets", produces = MediaType.APPLICATION_JSON_VALUE, params = "entityId")
public TagSets getTagSets(@RequestParam("entityId") Integer entityId) {
    ...
}

@GetMapping(value = "/tagSets", produces = MediaType.APPLICATION_JSON_VALUE)
public TagSets getTagSets() {
    ...
}
Reasons:
  • Blacklisted phrase (1): is there a way
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • High reputation (-1):
Posted by: shelley