주요 역할
GridCoordConverter)locationNames)을 조회하여 사용자의 실제 위치 정보 제공FcstItem)을 예보 시간 단위(fcstDate + fcstTime)로 그룹화WeatherForecast 및 하위 엔티티(온도, 습도, 강수, 풍속 등)로 변환하여 영속화/api/weathers/location: 위경도 기반 위치 정보 변환 API/api/weathers: 위치 기반 날씨 조회 APIWeatherDto 및 WeatherSummaryDto 형태로 제공NotificationService를 통해 사용자에게 SSE 기반 알림을 전송| Method | Endpoint | 설명 |
|---|---|---|
| GET | /api/weathers/location?longitude=&latitude |
위·경도 좌표를 기상청 단기예보 API용 좌표(X, Y) 및 행정구역명으로 변환 |
| GET | /api/weathers?longitude=&latitude |
사용자 위치 기반 날씨 정보 조회 (온디맨드 조회) |
locationNames)을 가짐@OneToMany(mappedBy = "location")로 여러 WeatherForecast를 가질 수 있음forecastedAt), 실제 예보 시각(forecastAt), 하늘 상태(SkyStatus) 등을 포함@ManyToOne으로 WeatherLocation에 속함WeatherTemperature, WeatherHumidity, WeatherPrecipitation, WeatherWindSpeed)와 1:1 관계(weather_location_id, forecast_at, forecasted_at)WeatherForecast와 공유 PK(@MapsId) 구조CascadeType.ALL)PrecipitationType)와 풍속 강도(WindStrength)는 Enum으로 관리WeatherForecast를 중심으로 하고, 각 속성은 공유 PK로 Forecast에 종속📡 (1) DTO 설계
id, forecastedAt, forecastAt, location, skyStatus, precipitation, humidity, temperature, windSpeedweatherId, skyStatus, precipitation, temperature