목록2024/01/02 (1)
쌓고 쌓다

만들고 있는 앱에서 서버로 "http://10.0.2.2:8080/inquirys/imagefile/b26295a2-6e46-49c9-9cf9-173fb8ad4a2b.jpg"와 같이 요청이 오면 이미지 파일을 응답으로 보내길 원했다. 그래서 다음과 같은 코드를 작성했다. @GetMapping("/imagefile/{imagefileName}") public ResponseEntity getImagefile(@PathVariable String imagefileName) throws IOException { UrlResource resource = new UrlResource("file:" + imageStore.getFullPath(imagefileName)); return ResponseEntity.o..
프로그래밍/spring
2024. 1. 2. 16:21