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