snp-sync-batch/src/main/resources/application-prod.yml
HYOJIN 744cc02f36 feat: snp-sync-batch 프로젝트 초기 설정
mda-snp-batch 기반으로 snp-sync-batch 프로젝트 생성
- 프론트엔드: Thymeleaf → React + TypeScript + Vite + Tailwind CSS 전환
- 컨텍스트: /snp-sync, 포트 8051
- 재수집(Recollection) 관련 코드 제거
- displayName → job_schedule.description 기반으로 전환
- 누락 API 추가 (statistics, jobs/detail, executions/recent)
- 실행 이력 조회 속도 개선 (JDBC 경량 쿼리)
- 스케줄 CRUD API 메서드 매핑 수정 (PUT/DELETE)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:33:31 +09:00

117 lines
3.4 KiB
YAML

spring:
application:
name: snp-sync-batch
# 정의한 DataSource만 사용하도록 합니다. (필수)
autoconfigure:
exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
# ===============================================
# 1. 배치 메타데이터 데이터소스 (Primary)
# Spring Batch의 JobRepository가 사용하는 DB입니다.
# ===============================================
batch-meta-datasource:
jdbc-url: jdbc:postgresql://211.208.115.83:5432/snpdb?currentSchema=snp_batch
username: snp
password: snp#8932
driver-class-name: org.postgresql.Driver
# HikariCP 풀 설정 (선택적)
hikari:
maximum-pool-size: 10
minimum-idle: 5
connection-timeout: 30000
# ===============================================
# 2. 비즈니스 데이터 데이터소스
# Spring Batch Step(ItemReader/Writer)이 데이터를 읽고 쓰는 DB입니다.
# ===============================================
business-datasource:
jdbc-url: jdbc:postgresql://211.208.115.83:5432/snpdb?currentSchema=std_snp_data
username: snp
password: snp#8932
driver-class-name: org.postgresql.Driver
# HikariCP 풀 설정 (선택적)
hikari:
maximum-pool-size: 10
minimum-idle: 5
connection-timeout: 30000
# JPA Configuration
jpa:
hibernate:
ddl-auto: update
show-sql: false
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
format_sql: false
default_schema: snp_batch
# Batch Configuration
batch:
jdbc:
table-prefix: "snp_batch.batch_"
initialize-schema: never # Changed to 'never' as tables already exist
job:
enabled: false # Prevent auto-run on startup
# Quartz Scheduler Configuration - Using JDBC Store for persistence
quartz:
job-store-type: jdbc # JDBC store for schedule persistence
jdbc:
initialize-schema: always # Create Quartz tables if not exist
properties:
org.quartz.scheduler.instanceName: SNPBatchScheduler
org.quartz.scheduler.instanceId: AUTO
org.quartz.threadPool.threadCount: 10
org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
org.quartz.jobStore.tablePrefix: QRTZ_
org.quartz.jobStore.isClustered: false
org.quartz.jobStore.misfireThreshold: 60000
# Server Configuration
server:
port: 8051
servlet:
context-path: /snp-sync
# Actuator Configuration
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheus,batch
endpoint:
health:
show-details: always
# Logging Configuration
logging:
level:
root: INFO
com.snp.batch: INFO
org.springframework.batch: WARN
org.springframework.jdbc: WARN
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} - %msg%n"
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
file:
name: logs/snp-sync-batch.log
# Custom Application Properties
app:
batch:
chunk-size: 10000
sub-chunk-size: 5000 # Writer Sub-Chunk 분할 크기
api:
url: https://api.example.com/data
timeout: 30000
ship-api:
url: https://shipsapi.maritime.spglobal.com
username: 7cc0517d-5ed6-452e-a06f-5bbfd6ab6ade
password: 2LLzSJNqtxWVD8zC
schedule:
enabled: true
cron: "0 0 * * * ?" # Every hour