feat: 영수증 OCR Google Vision 연동
CI / build (push) Failing after 14m0s

- VisionOcrService: 이미지→Google Vision DOCUMENT_TEXT_DETECTION 호출, 전체 텍스트 반환
- OcrController: POST /api/account/ocr/receipt (멀티파트, 로그인 필요)
- API 키는 GOOGLE_VISION_API_KEY 환경변수(.env)로만 주입 — 미설정 시 503
- multipart 업로드 10MB 허용

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-03 17:37:17 +09:00
parent bd0a0f7776
commit c1f97364aa
3 changed files with 134 additions and 0 deletions
+12
View File
@@ -13,6 +13,12 @@ spring:
application:
name: sb_bt
# 영수증 OCR 이미지 업로드 크기 (프론트에서 축소해 보내지만 여유 확보)
servlet:
multipart:
max-file-size: 10MB
max-request-size: 12MB
# ===== SQL 초기화 ===== 기동 시 member 테이블 자동 생성(IF NOT EXISTS 라 멱등)
sql:
init:
@@ -56,6 +62,12 @@ mybatis:
default-fetch-size: 100
default-statement-timeout: 30
# ===== Google Cloud Vision (영수증 OCR) =====
# 키는 서버 /opt/sb-backend/.env 에 GOOGLE_VISION_API_KEY=... 로 주입 (git 미추적). 미설정이면 OCR 비활성.
google:
vision:
api-key: ${GOOGLE_VISION_API_KEY:}
# ===== Logging =====
logging:
level: