I am trying to implement pagination in my spring application,however I am using @requestParams. Howver Postman is unable to send the parameters to my get methods which results in them picking the default value assigned.
I have tried rewriting the parameters multiple times, however if i type the entire link with the request params in the link then it worksthis is my get method
@GetMapping("/api/public/categories")public ResponseEntity<CategoryResponse> getallcategories( @RequestParam(name = "Page_number", defaultValue = Appconstants.PAGE_NUMBER,required = false) Integer pagenumber, @RequestParam(name = "Page size", defaultValue = Appconstants.PAGE_SIZE,required = false) Integer pgsize, @RequestParam(name = "Sortfield", defaultValue = Appconstants.SORT_CATEGORIES_BY, required = false) String sortby, @RequestParam(name = "sortorder", defaultValue = Appconstants.SORT_DEFAULT, required = false) String sortorder) { return new ResponseEntity<>( cate.getallcategories(pagenumber, pgsize, sortby, sortorder), HttpStatus.OK );}
this is the full urlhttp://localhost:8080/api/public/products
this is an example of my request](https://i.sstatic.net/pzx7OPwf.png)