I could use an endpoint to people to get a list of users when I send a list of user Id.
Something like this would work but with DTO and service etc...
http://localhost:8002/getUsers/1,3,4
@GetMapping("/{userIds}")
List<User> getUsers(@PathVariable List<Long> userIds) {
return userRepository.findAllById(userIds);
}