Repository navigation
feat/PB-32 외부 API 연동 및 데이터 수집 기능 추가 - #96
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 ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
| @Component | ||
| public class CongestionClient { | ||
|
|
||
| private static final Logger log = |
There was a problem hiding this comment.
// @slf4j가 있으면 해당 역할을 대신 한다.
// private final Logger log = LoggerFactory.getLogger(getClass());
There was a problem hiding this comment.
룸북을 쓸 때 리팩토링 하도록 하겠습니다.
| private String mapStatus(String level) { | ||
| if (level == null) return null; | ||
| return switch (level.toLowerCase()) { | ||
| case "low" -> "free"; |
There was a problem hiding this comment.
문자열을 직접 사용하시는 것보다 열거형을 사용하는 것이 '허용된값'만 들어오도록 강제 할 수 있어 데이터 무결성이 높아질듯하네요 시간되실때 고민해보시면 될듯합니다
There was a problem hiding this comment.
좋은 의견입니다. 추후 리팩토링 진행하겠습니다.
✨ Feature PR
🔗 Jira Issue (필수)
🧩 한눈에 요약 (필수)
무엇을 추가/변경했나?
왜 필요한가? (User value / problem)
범위(스코프)
🧱 설계/접근 (권장)
✅ Acceptance Criteria (AC) (필수)
🧪 테스트 / 검증 (필수)
로컬
CI
Smoke / 수동 검증
테스트 공백(있다면 이유 필수)
🧭 영향 범위 (필수)
💥 Breaking / Compatibility (필수)
🚀 롤아웃/관측 (권장)
Feature Flag / 단계적 배포
측정(있다면)
모니터링/알림
리스크
롤백
📸 증빙 (선택)
$SQL = @'
Invoke-WebRequest http://127.0.0.1:8000/health
StatusCode : 200
StatusDescription : OK
Content : {"status":"ok"}
RawContent : HTTP/1.1 200 OK
Content-Length: 15
Content-Type: application/json
Date: Sat, 27 Dec 2025 06:37:12 GMT
Server: uvicorn
Forms : {}
Headers : {[Content-Length, 15], [Content-Type, application/json], [Date, Sat, 27 Dec 2025 06:37:12 GMT], [Server,
uvicorn]}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 15
[ scheduling-1] c.b.scheduler.BeachConditionScheduler : Scheduled condition refresh triggered
2025-12-27T17:30:00.009+09:00 DEBUG 43912 --- [beach-complex] [ scheduling-1] org.hibernate.SQL
:
select
b1_0.id,
b1_0.boundary,
b1_0.code,
b1_0.created_at,
b1_0.is_favorite,
b1_0.location,
b1_0.name,
b1_0.status,
b1_0.tag,
b1_0.updated_at
from
public.beaches b1_0
2025-12-27T17:30:00.731+09:00 DEBUG 43912 --- [beach-complex] [ scheduling-1] org.hibernate.SQL
:
insert
into
public.beach_conditions
(beach_id, observation_point, observed_at, water_temperature_celsius, wave_height_meters, weather_summary, id)
values
(?, ?, ?, ?, ?, ?, ?)
docker compose exec -T postgres psql -U beach -d beach_complex -c "SELECT id, code, name FROM beaches;"
time="2025-12-27T15:49:32+09:00" level=warning msg="C:\Users\ParkJaeHong\Desktop\백엔드 프로젝트\Beach_complex\docker-compose.yml: the attribute
versionis obsolete, it will be ignored, please remove it to avoid potential confusion"id | code | name
--------------------------------------+-----------+--------
5d753a1a-7f6b-450c-b166-03a0651cdd40 | haeundae | 해운대
11c8aa80-80c5-4fe9-8167-29eb23d9328c | gwangalli | 광안리
10877c81-6080-400b-b149-6ae4ee83ad13 | songjeong | 송정
(3 rows)
Invoke-RestMethod -Uri "http://localhost:8080/api/beaches/haeundae" -Headers $headers
id : 5d753a1a-7f6b-450c-b166-03a0651cdd40
code : haeundae
name : í´ì´ë
status : normal
latitude : 35.16
longitude : 129.158
updatedAt : 1766818008.910166000
tag :
isFavorite : False
Invoke-RestMethod -Uri "http://localhost:8080/api/beaches" -Headers $headers
id : 5d753a1a-7f6b-450c-b166-03a0651cdd40
code : haeundae
name : í´ì´ë
status : normal
latitude : 35.16
longitude : 129.158 updatedAt : 1766818008.910166000 tag : isFavorite : False
id : 11c8aa80-80c5-4fe9-8167-29eb23d9328c
code : gwangalli
name : ê´ì리
status : normal
latitude : 35.153
longitude : 129.118
updatedAt : 1766818008.910166000
tag :
isFavorite : False
id : 10877c81-6080-400b-b149-6ae4ee83ad13
code : songjeong
name : ì¡ì
status : normal
latitude : 35.178
longitude : 129.205
updatedAt : 1766818008.910166000
tag :
isFavorite : False
Invoke-WebRequest http://127.0.0.1:8000/health
StatusCode : 200
StatusDescription : OK
Content : {"status":"ok"}
RawContent : HTTP/1.1 200 OK
Content-Length: 15
Content-Type: application/json
Date: Sat, 27 Dec 2025 06:51:21 GMT
Server: uvicorn
Forms : {}
Headers : {[Content-Length, 15], [Content-Type, application/json], [Date, Sat, 27 Dec 2025 06:51:21 GMT], [Server,
uvicorn]}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 15
$beaches = Invoke-RestMethod -Uri "http://localhost:8080/api/beaches" -Headers $headers
id : d1efbbad-edd5-454c-ba5d-13d9eb7f78c6
beachId : 5d753a1a-7f6b-450c-b166-03a0651cdd40
observedAt : 1766818800.054279000
waterTemperatureCelsius : 5.03000000000003
waveHeightMeters :
weatherSummary : temp:5.0C, rain:0.0mm, wind:2.6m/s
latitude : 35.16
longitude : 129.158
Invoke-RestMethod -Uri "http://localhost:8080/api/beaches/$beachId/conditions/recent" -Headers $headers | ConvertTo-Json
💬 리뷰 가이드 (필수)