server: port: 8080 servlet: context-path: / # Nginx(HTTPS) 리버스 프록시 뒤 — X-Forwarded-* 를 신뢰해 원래 스킴/호스트 인식 (CORS·리다이렉트 정확) forward-headers-strategy: framework spring: # 로컬 개발 시 .env(properties 형식, git 미추적)에서 환경변수 로드. 없으면 OS/컨테이너 환경변수 사용. config: import: optional:file:.env[.properties] application: name: sb_bt # 영수증 OCR 이미지 업로드 크기 (프론트에서 축소해 보내지만 여유 확보) servlet: multipart: max-file-size: 10MB max-request-size: 12MB # ===== SQL 초기화 ===== 기동 시 member 테이블 자동 생성(IF NOT EXISTS 라 멱등) sql: init: mode: always schema-locations: classpath:db/member.sql,classpath:db/board.sql,classpath:db/account.sql,classpath:db/dev-seed.sql continue-on-error: true # ===== MariaDB ===== (접속 정보는 환경변수로 외부화) datasource: driver-class-name: org.mariadb.jdbc.Driver url: ${DB_URL:jdbc:mariadb://localhost:3306/sb_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Seoul} username: ${DB_USERNAME:root} password: ${DB_PASSWORD:} hikari: maximum-pool-size: 10 minimum-idle: 2 connection-timeout: 30000 pool-name: sbHikariPool # ===== Redis ===== (접속 정보는 환경변수로 외부화) data: redis: host: ${REDIS_HOST:localhost} port: ${REDIS_PORT:6379} password: ${REDIS_PASSWORD:} database: ${REDIS_DATABASE:0} timeout: 3000ms lettuce: pool: max-active: 8 max-idle: 8 min-idle: 0 # ===== MyBatis ===== mybatis: type-aliases-package: com.sb.web.user.domain,com.sb.web.auth.domain mapper-locations: classpath:mapper/**/*.xml configuration: map-underscore-to-camel-case: true jdbc-type-for-null: 'NULL' 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:} # ===== 민감 필드 암호화 (계좌번호 등) ===== # 키는 서버 /opt/sb-backend/.env 에 ACCOUNT_CRYPTO_KEY=Base64(32바이트) 로 주입 (git 미추적). # 미설정이면 암호화 비활성(평문 저장). 키 분실 시 기존 암호문 복호화 불가하므로 안전하게 보관. app: crypto: account-key: ${ACCOUNT_CRYPTO_KEY:} # 업로드 이미지 등 외부에서 접근할 절대 URL 베이스. 앱(Capacitor)은 출처가 localhost 라 상대경로가 안 통함. public-url: ${PUBLIC_URL:https://app.sblog.kr} # ===== Logging ===== logging: level: root: INFO com.sb.web: DEBUG com.sb.web.user.mapper: DEBUG com.sb.web.auth.mapper: DEBUG