2025-10-22 13:50:04 +09:00
|
|
|
spring:
|
|
|
|
|
application:
|
|
|
|
|
name: snp-batch
|
|
|
|
|
|
|
|
|
|
# PostgreSQL Database Configuration
|
|
|
|
|
datasource:
|
2025-12-12 15:34:02 +09:00
|
|
|
url: jdbc:postgresql://211.208.115.83:5432/snpdb
|
2025-10-22 13:50:04 +09:00
|
|
|
username: snp
|
|
|
|
|
password: snp#8932
|
|
|
|
|
driver-class-name: org.postgresql.Driver
|
|
|
|
|
hikari:
|
|
|
|
|
maximum-pool-size: 10
|
|
|
|
|
minimum-idle: 5
|
|
|
|
|
connection-timeout: 30000
|
|
|
|
|
|
|
|
|
|
# JPA Configuration
|
|
|
|
|
jpa:
|
|
|
|
|
hibernate:
|
|
|
|
|
ddl-auto: update
|
2025-12-02 16:24:57 +09:00
|
|
|
show-sql: false
|
2025-10-22 13:50:04 +09:00
|
|
|
properties:
|
|
|
|
|
hibernate:
|
|
|
|
|
dialect: org.hibernate.dialect.PostgreSQLDialect
|
|
|
|
|
format_sql: true
|
2025-12-02 12:26:49 +09:00
|
|
|
default_schema: snp_data
|
2025-10-22 13:50:04 +09:00
|
|
|
|
|
|
|
|
# Batch Configuration
|
|
|
|
|
batch:
|
|
|
|
|
jdbc:
|
2025-11-27 21:55:46 +09:00
|
|
|
table-prefix: "snp_data.batch_"
|
2025-10-22 13:50:04 +09:00
|
|
|
initialize-schema: never # Changed to 'never' as tables already exist
|
|
|
|
|
job:
|
|
|
|
|
enabled: false # Prevent auto-run on startup
|
|
|
|
|
|
|
|
|
|
# Thymeleaf Configuration
|
|
|
|
|
thymeleaf:
|
|
|
|
|
cache: false
|
|
|
|
|
prefix: classpath:/templates/
|
|
|
|
|
suffix: .html
|
|
|
|
|
|
|
|
|
|
# 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
|
2025-12-12 15:34:02 +09:00
|
|
|
org.quartz.jobStore.tablePrefix: snp_data.QRTZ_
|
2025-10-22 13:50:04 +09:00
|
|
|
org.quartz.jobStore.isClustered: false
|
|
|
|
|
org.quartz.jobStore.misfireThreshold: 60000
|
|
|
|
|
|
|
|
|
|
# Server Configuration
|
|
|
|
|
server:
|
2025-12-05 10:17:08 +09:00
|
|
|
port: 8081
|
2025-10-22 13:50:04 +09:00
|
|
|
servlet:
|
2025-12-02 16:24:57 +09:00
|
|
|
context-path: /snp-api
|
2025-10-22 13:50:04 +09:00
|
|
|
|
|
|
|
|
# Actuator Configuration
|
|
|
|
|
management:
|
|
|
|
|
endpoints:
|
|
|
|
|
web:
|
|
|
|
|
exposure:
|
|
|
|
|
include: health,info,metrics,prometheus,batch
|
|
|
|
|
endpoint:
|
|
|
|
|
health:
|
|
|
|
|
show-details: always
|
|
|
|
|
|
2025-12-02 16:24:57 +09:00
|
|
|
# Logging Configuration (logback-spring.xml에서 상세 설정)
|
2025-10-22 13:50:04 +09:00
|
|
|
logging:
|
2025-12-02 16:24:57 +09:00
|
|
|
config: classpath:logback-spring.xml
|
2025-10-22 13:50:04 +09:00
|
|
|
|
|
|
|
|
# Custom Application Properties
|
|
|
|
|
app:
|
|
|
|
|
batch:
|
|
|
|
|
chunk-size: 1000
|
|
|
|
|
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
|
2025-11-27 21:55:46 +09:00
|
|
|
ais-api:
|
|
|
|
|
url: https://aisapi.maritime.spglobal.com
|
|
|
|
|
webservice-api:
|
|
|
|
|
url: https://webservices.maritime.spglobal.com
|
2025-10-22 13:50:04 +09:00
|
|
|
schedule:
|
|
|
|
|
enabled: true
|
|
|
|
|
cron: "0 0 * * * ?" # Every hour
|
2025-12-04 13:05:00 +09:00
|
|
|
|
2026-01-09 14:25:27 +09:00
|
|
|
# AIS Target Import 배치 설정 (캐시 업데이트 전용)
|
2025-12-02 16:24:57 +09:00
|
|
|
ais-target:
|
|
|
|
|
since-seconds: 60 # API 조회 범위 (초)
|
2026-01-09 14:59:20 +09:00
|
|
|
chunk-size: 50000 # 배치 청크 크기
|
2025-12-02 16:24:57 +09:00
|
|
|
schedule:
|
|
|
|
|
cron: "15 * * * * ?" # 매 분 15초 실행
|
2026-01-09 14:25:27 +09:00
|
|
|
|
|
|
|
|
# AIS Target DB Sync 배치 설정 (캐시 → DB 저장)
|
|
|
|
|
ais-target-db-sync:
|
|
|
|
|
time-range-minutes: 15 # 캐시에서 조회할 시간 범위 (분)
|
|
|
|
|
schedule:
|
|
|
|
|
cron: "0 0/15 * * * ?" # 매 15분 정각 실행 (00, 15, 30, 45분)
|
|
|
|
|
|
2025-12-02 16:24:57 +09:00
|
|
|
# AIS Target 캐시 설정
|
|
|
|
|
ais-target-cache:
|
|
|
|
|
ttl-minutes: 120 # 캐시 TTL (분) - 2시간
|
|
|
|
|
max-size: 300000 # 최대 캐시 크기 - 30만 건
|
2025-12-04 13:05:00 +09:00
|
|
|
|
2025-12-10 08:14:28 +09:00
|
|
|
# ClassType 분류 설정
|
|
|
|
|
class-type:
|
|
|
|
|
refresh-hour: 4 # Core20 캐시 갱신 시간 (기본: 04시)
|
|
|
|
|
|
|
|
|
|
# Core20 캐시 테이블 설정 (환경별로 테이블/컬럼명이 다를 수 있음)
|
|
|
|
|
core20:
|
|
|
|
|
schema: snp_data # 스키마명
|
2026-01-09 14:59:20 +09:00
|
|
|
table: ship_detail_data # 테이블명
|
2025-12-10 08:14:28 +09:00
|
|
|
imo-column: ihslrorimoshipno # IMO/LRNO 컬럼명 (PK, NOT NULL)
|
|
|
|
|
mmsi-column: maritimemobileserviceidentitymmsinumber # MMSI 컬럼명 (NULLABLE)
|
|
|
|
|
|
2025-12-04 13:05:00 +09:00
|
|
|
# 파티션 관리 설정
|
|
|
|
|
partition:
|
|
|
|
|
# 일별 파티션 테이블 목록 (네이밍: {table}_YYMMDD)
|
|
|
|
|
daily-tables:
|
|
|
|
|
- schema: snp_data
|
|
|
|
|
table-name: ais_target
|
|
|
|
|
partition-column: message_timestamp
|
|
|
|
|
periods-ahead: 3 # 미리 생성할 일수
|
|
|
|
|
# 월별 파티션 테이블 목록 (네이밍: {table}_YYYY_MM)
|
|
|
|
|
monthly-tables: [] # 현재 없음
|
|
|
|
|
# 기본 보관기간
|
|
|
|
|
retention:
|
|
|
|
|
daily-default-days: 14 # 일별 파티션 기본 보관기간 (14일)
|
|
|
|
|
monthly-default-months: 1 # 월별 파티션 기본 보관기간 (1개월)
|
|
|
|
|
# 개별 테이블 보관기간 설정 (옵션)
|
|
|
|
|
custom:
|
|
|
|
|
# - table-name: ais_target
|
|
|
|
|
# retention-days: 30 # ais_target만 30일 보관
|