File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/land/leets/domain/image/presentation Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 10
10
import org .springframework .web .bind .annotation .PathVariable ;
11
11
import org .springframework .web .bind .annotation .RequestMapping ;
12
12
import org .springframework .web .bind .annotation .RestController ;
13
- import org .springframework .core .io .FileSystemResource ;
13
+ import org .springframework .core .io .ClassPathResource ;
14
14
15
15
@ RestController
16
16
@ RequiredArgsConstructor
@@ -20,7 +20,7 @@ public class ImageController {
20
20
private String imageStoragePath ;
21
21
@ GetMapping ("/{imageName}" )
22
22
public ResponseEntity <?> getImage (@ PathVariable String imageName ) {
23
- Resource resource = new FileSystemResource (imageStoragePath + imageName );
23
+ Resource resource = new ClassPathResource (imageStoragePath + imageName );
24
24
return new ResponseEntity <>(resource , HttpStatus .OK );
25
25
}
26
26
}
You can’t perform that action at this time.
0 commit comments