[DB] 여행 정보 검색 API 및 프론트엔드 UI 구현#24
Merged
usn757 merged 21 commits intoPETTY-HUB:mainfrom Apr 26, 2025
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
📜 PR 내용 요약
⚒️ 작업 및 변경 내용 (상세하게)
1. Backend API 개발 (
/api/v1/contents)TourController:GET /codes) 구현.GET /{contentId}) 구현.GET /search/area) 구현 (페이징 지원).GET /search/location) 구현 (페이징 지원).TourService/TourServiceImpl:@Transactional을 이용한 트랜잭션 관리 적용.AreaRepository,SigunguRepository,ContentRepository):ContentRepository:findByAreaCriteria).findByLocationNative) 및ST_Distance_Sphere함수 활용 (거리순 정렬).TourSummaryProjection인터페이스 정의.Content,Area,Sigungu,SigunguId등):Content엔티티에 공간 데이터 저장을 위한org.locationtech.jts.geom.Point타입의location필드 추가 (SRID 4326).PetTourInfo,ContentImage등) 연관 관계 매핑.CodeNameDto,DetailCommonDto,TourSummaryDto등):ContentMapper):@Named를 활용한 커스텀 매핑 로직 추가 (e.g.,BigDecimaltoString,BooleantoY/N).ResourceNotFoundException):@Slf4j어노테이션을 사용하여 Controller, Service 주요 로직에 로그 추가.2. Frontend UI 개발
search.html):styles.css):search.js):loadSigunguCodes).displayResults,loadMore).showDetail,renderDetail).getCurrentLocation).3. 빌드 및 설정
build.gradle:lombok-mapstruct-binding) 설정.jts-core) 및 Hibernate Spatial (hibernate-spatial) 의존성 추가.PettyApplication.java:@EnableSpringDataWebSupport(pageSerializationMode = EnableSpringDataWebSupport.PageSerializationMode.VIA_DTO)어노테이션 추가하여 Spring DataPage객체의 DTO 기반 직렬화 활성화.📚 기타 참고 사항 및 리뷰 포인트
ContentRepository의 Native Spatial Query (위치 기반 검색) 성능 및 정확성 확인 (DB 환경 고려).search.js)의 API 연동 로직, UI/UX (검색, 상세 보기, 페이지네이션, 현재 위치 사용) 플로우 검토.content테이블의location컬럼에 공간 인덱스(Spatial Index) 생성을 권장합니다.build.gradle변경 사항에 포함되어 있습니다. IDE에서도 Annotation Processing 활성화가 필요할 수 있습니다.🔧 추후 확장 예정 (선택 사항)
contentTypeId) 등 추가 검색 필터 UI 및 로직 구현.