스프링 부트에서 이미지 처리시 주의사항이 되어버린 셈이다.

 

확장자 없는 요청을 아래와 같이 수정하고 정상동작함
// 확장자 없는 요청 처리 (jpg, png, gif 등 순회 탐색)
    @GetMapping("/{memberId:[0-9]+}")
    public ResponseEntity<Resource> getPhoto(@PathVariable String memberId)

// 확장자 포함 요청 처리 (예: /api/member/photo/10.png)
    @GetMapping("/{memberId}.{ext}")
    public ResponseEntity<Resource> getPhotoWithExt

 

728x90
블로그 이미지

Link2Me

,