findAll
Atualizado
Antes
@Transactional(readOnly = true)
public List<UserDTO> findAll() {
List<UserDTO> result = repository.findAll().stream().map(x -> new UserDTO(x)).toList();
return result;
}
Depois
public Flux<UserDTO> findAll() {
return repository.findAll().map(UserDTO::new);
}
Antes
@GetMapping
public ResponseEntity<List<UserDTO>> findAll() {
List<UserDTO> list = service.findAll();
return ResponseEntity.ok().body(list);
}
Depois
@GetMapping
public Flux<UserDTO> findAll() {
return service.findAll();
}
Atualizado