GET userPost

Controller

@GetMapping(value = "/{id}/posts")
public ResponseEntity<List<PostDTO>> getUserPosts(@PathVariable String id) {
    List<PostDTO> obj = userService.getUsersPosts(id);
    return ResponseEntity.ok().body(obj);
}

Service

Atualizado