Closed Vaibhav-Andhale closed 2 years ago
Hi @darrachequesne , Thanks for response. I did something like you.
public Function<User, UserDTO> createConverter(){
return (Function<User, UserDTO>) (input) ->{
UserDTO dto= new UserDTO();
dto.setId(input.getId)
//...
return dto;
};
}
i'm going through your document and i found below code but what is "toUserDTO". Please explain. @RestController public class UserRestController {
@Autowired private UserRepository userRepository;
@RequestMapping(value = "/data/users", method = RequestMethod.GET) public DataTablesOutput getUsers(@Valid DataTablesInput input) {
return userRepository.findAll(input, toUserDTO);
}
}