feat(S15P11A705-305): record 상세 응답에 place 썸네일을 추가한다 - #184
Merged
Conversation
카카오 로컬 API는 장소 사진을 제공하지 않으므로 시연용 목업 단계로 간다. core.place.thumbnail_url(V7, nullable)을 추가하고 PlaceSummaryResponse로 내려주며, 정적 이미지 4장을 /images/places/에 두어 SQL로 수동 연결한다. 저장값은 context-path 포함 절대 경로라 카카오 이미지 검색 API 전환 시에도 프론트 계약이 바뀌지 않는다. 이미지 경로는 인증 제외다 — 정적 서빙 테스트가 401로 실패하며 anyRequest().authenticated()에 막히는 것을 잡았고, img 태그 요청에는 인증 컨텍스트가 보장되지 않아 /images/places/**를 permitAll로 연다. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
시연용 실제 이미지(표지)가 나오면 버려질 파일이라 배포 산출물에 싣지 않는다. 테스트 클래스패스의 static/도 MockMvc에서 동일하게 서빙되므로 경로·인증 제외 검증은 그대로다. 표지는 같은 파일명 규약으로 src/main/resources/static/images/places/에 커밋한다. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을
record 상세(명세 11.1) 응답의
place에thumbnailUrl을 추가한다. 시연용 목업 단계다 — 카카오 로컬 API는 장소 사진을 제공하지 않으므로, 백엔드 정적 리소스 이미지를 두고 시연 대상 place에 SQL로 수동 연결한다.V7__place_thumbnail_url.sql:core.place.thumbnail_url varchar(300)(nullable)Place엔티티thumbnailUrl필드·getter (create()시그니처 불변 — 생성 경로는 값을 채우지 않는다)PlaceSummaryResponse.thumbnailUrl— 이 DTO를 쓰는 모든 응답에 반영, null이어도 필드를 생략하지 않는다src/test/resources/static/images/places/*.jpg(1200×900, 4:3) — 테스트 전용이라 배포 산출물에 실리지 않는다. 시연용 실제 이미지(표지)가 나오면 같은 파일명 규약으로src/main/resources/static/images/places/에 커밋한다SecurityConfig에PUBLIC_STATIC_ASSETS(/images/places/**) permitAll 추가왜 인증 제외가 필요한가
정적 서빙 테스트가 404가 아니라 401로 실패하면서
anyRequest().authenticated()에 막히는 것을 잡았다. 프론트가<img src>로 직접 로드하는 경로라 인증을 요구하면 화면에서 이미지가 깨진다. 장소 이미지는 비밀이 아니다.계약 메모
/api/core/images/places/cafe-1.jpg). 프론트는 그대로<img src>에 쓴다. 이후 카카오 이미지 검색 API(GET /v2/search/image) 전환 시 같은 컬럼에 외부 절대 URL이 들어가고 프론트 계약은 바뀌지 않는다.시연 준비 SQL (배포 후 수동 실행)
배포 DB 쓰기 권한은 infra#189에서 요청 중이다.
검증
./gradlew clean check --no-daemon통과Closes #182
🤖 Generated with Claude Code