I have this URL.
http://localhost:9000/api/datos-generales?page=0&size=20&sort=id,asc&filter=7588
and I want to recover the value of the last parameter. "filter".
this is the signature of the method in the backend.
@RestController@RequestMapping("/api/datos-generales")public class DatosGeneralesResource { @GetMapping("") public ResponseEntity<List<DatosGeneralesDTO>> getAllDatosGenerales( @org.springdoc.core.annotations.ParameterObject Pageable pageable, // @RequestAttribute(name = "filter", required = false, value = "") String filter, @RequestParam(name = "filter", defaultValue = "", required = false) String filter ) {//SOME CODE log.debug('FILTER:", filter);//Here the output is "FILTER:" but the value is not logged.}}
I've tried with RequestAttribute, RequestParam even with RequestBody but none of them can get the value in the param.
what is the right way?