0

I have request like ...?abc=value and following rest implementation (Spring):

@GetMapping("/")
String getSth(Pojo pojo) {
...
}

where Pojo is

Pojo {
 private String someOtherName;
 //getters, setters
}

Is it possible to bind query param abc to class attribute someOtherName? I know, that if query param fits to pojo attribute, it works by default... Does Spring support custom mappings between POJO attributes and query params?

user109447
  • 1,069
  • 1
  • 10
  • 20

0 Answers0