When you are using a path it essentially adds to the uri . The uri has length limitations.
Related post : Maximum length of HTTP GET request
So it is not advisable to add multiple number of parameters to the uri as path variable, when the number is not restricted.
You could use query params like :
@RequestMapping(value = "/{ids}", method=RequestMethod.GET)
public String getMethod(@RequestParam("myparam") List<String> ids)
{
}
Instead what you could have is convert it to a post request and have a request body with the list of data as an object.
@PostMapping("/")
public ResponseEntity postController(
@RequestBody CustomPojo data) {
exampleService.fakeAuthenticate(data);
return ResponseEntity.ok(HttpStatus.OK);
}
class CustomPoJo {
List<String> ids;
//getter setter etc
}
and the json could look like :
{"custompojo":["id1","id2"]}