feat: 스팟/체크인/한줄평 API 및 로컬(H2) 실행 프로파일

- GET /api/spots, POST /{id}/checkins, GET /{id}/mates, GET·POST /{id}/reviews
- Spot/CheckIn/SpotReview 엔티티·서비스 (체크인 2시간 TTL, 만료 비노출)
- CORS 허용(Vite dev, Capacitor iOS/AOS)
- local 프로파일: Postgres 없이 H2로 기동 + 시드 데이터 (연동 검증용)
- V2 마이그레이션: spots 위경도 컬럼 추가, geom NOT NULL 완화

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
sb
2026-07-11 08:07:43 +09:00
parent 1befad06d2
commit 115bc13ea1
15 changed files with 550 additions and 1 deletions
@@ -0,0 +1,23 @@
package com.dog.dognation.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/** 프론트엔드(Vite dev / Capacitor 웹뷰)에서의 크로스 오리진 호출 허용. */
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedOrigins(
"http://localhost:9000", // Vite dev server
"http://localhost", // Capacitor(Android)
"capacitor://localhost", // Capacitor(iOS)
"ionic://localhost"
)
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")
.allowedHeaders("*");
}
}