Пример #1
0
 @RequestMapping(
     value = "/autoComplete",
     method = RequestMethod.GET,
     produces = "application/json")
 public List<PatientDTO> autoComplete(@RequestParam String filter) {
   return patientRepository
       .findByNameStartsWith(filter)
       .stream()
       .map(x -> new PatientDTO(x))
       .collect(Collectors.toList());
 }