springboot restcontroller error type=Not Found, status=404 단순한 springboot restcontroller 는 생성하여 테스트하는데 어이없게도 아래와 같은 오류가 발생함. There was an unexpected error (type=Not Found, status=404). 이유를 알아보니 restcontroller package 가 springboot main 클래스의 package의 같거나 하위 package에 존재해야 한다. 별 생쑈를 했는데 이런 오류인 것은 처음 알게됨. 개발환경 2023.11.22
springboot mp4 streaming and download mp4 같은 동영상을 스트리밍하는 경우와 다운로드를 동시에 처리하는 리소스가 없어서 이것저것 살펴보면서 작성함. 스트리밍요청과 다운로드 요청을 구분하여 처리하는게 필요함. 브라우저에서 여러번 요청을 받아서 처리해야 하므로 InputStreamResource 이 아닌 FileSystemResource 를 사용해야 함 @RequestMapping(value = "/api/file/download/{filepath}" , method = RequestMethod.GET , produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) public ResponseEntity getMp4StreamingAndDownload(@RequestHeader(value = "Range", .. 개발환경 2023.09.26