Skip to content

Commit 84f8534

Browse files
authored
hotfix: 이미지 반환 함수 수정
1 parent de8c710 commit 84f8534

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/land/leets/domain/image/presentation/ImageController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import org.springframework.web.bind.annotation.PathVariable;
1111
import org.springframework.web.bind.annotation.RequestMapping;
1212
import org.springframework.web.bind.annotation.RestController;
13-
import org.springframework.core.io.FileSystemResource;
13+
import org.springframework.core.io.ClassPathResource;
1414

1515
@RestController
1616
@RequiredArgsConstructor
@@ -20,7 +20,7 @@ public class ImageController {
2020
private String imageStoragePath;
2121
@GetMapping("/{imageName}")
2222
public ResponseEntity<?> getImage(@PathVariable String imageName) {
23-
Resource resource = new FileSystemResource(imageStoragePath + imageName);
23+
Resource resource = new ClassPathResource(imageStoragePath + imageName);
2424
return new ResponseEntity<>(resource, HttpStatus.OK);
2525
}
2626
}

0 commit comments

Comments
 (0)