package es.uv.garcosda.controllers; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn; import java.util.ArrayList; import java.util.List; import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import es.uv.garcosda.domain.Video; import es.uv.garcosda.services.VideoService; @RestController @RequestMapping("/api/v1/videos") public class VideoController { private final static Logger LOGGER = LoggerFactory.getLogger(VideoController.class); @Autowired private VideoService vs; @GetMapping("") public ResponseEntity> findVideos(@RequestParam(value="title", required = false) Optional title, @RequestParam(value="user", required = false) Optional userId) { List