refactor(config): API 인증정보 공통화 및 미사용 설정 제거 (#59) #60

병합
HYOJIN feature/ISSUE-59-remove-mda-config 에서 develop 로 2 commits 를 머지했습니다 2026-03-17 16:21:07 +09:00
6개의 변경된 파일12개의 추가작업 그리고 191개의 파일을 삭제

파일 보기

@ -56,6 +56,7 @@
- 재시도 상태 배지 표시 (대기/재시도 N/3/재시도 초과) - 재시도 상태 배지 표시 (대기/재시도 N/3/재시도 초과)
- 미사용 Dead Code 정리 (~1,200 LOC 삭제) - 미사용 Dead Code 정리 (~1,200 LOC 삭제)
- 미사용 배치 작업 13개 제거 (~4,000 LOC 삭제) (#40) - 미사용 배치 작업 13개 제거 (~4,000 LOC 삭제) (#40)
- API 인증정보 공통화(api-auth) 및 환경별 중복 설정 제거 (#59)
### 기타 ### 기타
- Gitea 팀 프로젝트 워크플로우 구조 적용 - Gitea 팀 프로젝트 워크플로우 구조 적용
@ -65,4 +66,4 @@
- 팀 글로벌 워크플로우 1.5.0 동기화 - 팀 글로벌 워크플로우 1.5.0 동기화
- 팀 워크플로우 v1.6.1 동기화 - 팀 워크플로우 v1.6.1 동기화
- 실행 확인 모달 시작/종료일시 항목 제거 - 실행 확인 모달 시작/종료일시 항목 제거
- QA 환경 설정 파일 추가 - MDA 전용 설정파일(application-qa.yml) 제거 (#59)

파일 보기

@ -40,10 +40,10 @@ public class MaritimeApiWebClientConfig {
private String maritimeServiceApiUrl; private String maritimeServiceApiUrl;
@Value("${app.batch.ship-api.username}") @Value("${app.batch.api-auth.username}")
private String maritimeApiUsername; private String maritimeApiUsername;
@Value("${app.batch.ship-api.password}") @Value("${app.batch.api-auth.password}")
private String maritimeApiPassword; private String maritimeApiPassword;
/** /**

파일 보기

@ -28,7 +28,7 @@ spring:
batch: batch:
jdbc: jdbc:
table-prefix: "std_snp_data.batch_" table-prefix: "std_snp_data.batch_"
initialize-schema: always # Changed to 'never' as tables already exist initialize-schema: never # Changed to 'never' as tables already exist
job: job:
enabled: false # Prevent auto-run on startup enabled: false # Prevent auto-run on startup
@ -95,13 +95,8 @@ logging:
app: app:
batch: batch:
chunk-size: 1000 chunk-size: 1000
api:
url: https://api.example.com/data
timeout: 30000
ship-api: ship-api:
url: https://shipsapi.maritime.spglobal.com url: https://shipsapi.maritime.spglobal.com
username: 7cc0517d-5ed6-452e-a06f-5bbfd6ab6ade
password: 2LLzSJNqtxWVD8zC
ais-api: ais-api:
url: https://aisapi.maritime.spglobal.com url: https://aisapi.maritime.spglobal.com
webservice-api: webservice-api:

파일 보기

@ -4,9 +4,9 @@ spring:
# PostgreSQL Database Configuration # PostgreSQL Database Configuration
datasource: datasource:
url: jdbc:postgresql://10.187.58.58:5432/mdadb url: jdbc:postgresql://211.208.115.83:5432/snpdb
username: mda username: snp
password: mda#8932 password: snp#8932
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
hikari: hikari:
maximum-pool-size: 10 maximum-pool-size: 10
@ -72,8 +72,7 @@ spring:
# Server Configuration # Server Configuration
server: server:
port: 9000 port: 8041
# port: 8041
servlet: servlet:
context-path: /snp-api context-path: /snp-api
@ -97,13 +96,8 @@ logging:
app: app:
batch: batch:
chunk-size: 1000 chunk-size: 1000
api:
url: https://api.example.com/data
timeout: 30000
ship-api: ship-api:
url: http://10.29.16.219:18030/shipsapi url: http://10.29.16.219:18030/shipsapi
username: 7cc0517d-5ed6-452e-a06f-5bbfd6ab6ade
password: 2LLzSJNqtxWVD8zC
ais-api: ais-api:
url: http://10.29.16.219:18030/aisapi url: http://10.29.16.219:18030/aisapi
webservice-api: webservice-api:

파일 보기

@ -1,167 +0,0 @@
spring:
application:
name: snp-batch-validation
# PostgreSQL Database Configuration
datasource:
url: jdbc:postgresql://10.26.252.39:5432/mdadb
username: mda
password: mda#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
show-sql: false
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
format_sql: true
default_schema: std_snp_data
# Batch Configuration
batch:
jdbc:
table-prefix: "std_snp_data.batch_"
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: never # Quartz tables manually created in std_snp_data schema
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: std_snp_data.QRTZ_
org.quartz.jobStore.isClustered: false
org.quartz.jobStore.misfireThreshold: 60000
# Kafka Configuration (DEV)
kafka:
bootstrap-servers: localhost:9092 # TODO: DEV Kafka Broker IP/PORT 설정
producer:
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.apache.kafka.common.serialization.StringSerializer
acks: all
retries: 3
properties:
enable.idempotence: true
compression.type: snappy
linger.ms: 20
batch.size: 65536
max.block.ms: 3000
request.timeout.ms: 5000
delivery.timeout.ms: 10000
# Server Configuration
server:
port: 8041
# port: 8041
servlet:
context-path: /snp-api
# Actuator Configuration
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheus,batch
endpoint:
health:
show-details: always
# Logging Configuration (logback-spring.xml에서 상세 설정)
logging:
config: classpath:logback-spring.xml
# 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
ais-api:
url: https://aisapi.maritime.spglobal.com
webservice-api:
url: https://webservices.maritime.spglobal.com
schedule:
enabled: true
cron: "0 0 * * * ?" # Every hour
# LAST_EXECUTION 버퍼 시간 (시간 단위) - 외부 DB 동기화 지연 대응
last-execution-buffer-hours: 24
# ShipDetailUpdate 배치 설정 (dev - 기존과 동일하게 20건 유지)
ship-detail-update:
batch-size: 20 # dev에서는 문제 없으므로 기존 20건 유지
delay-on-success-ms: 300
delay-on-failure-ms: 2000
max-retry-count: 3
# AIS Target 배치 설정
ais-target:
since-seconds: 60 # API 조회 범위 (초)
chunk-size: 50000 # 배치 청크 크기
schedule:
cron: "15 * * * * ?" # 매 분 15초 실행
kafka:
enabled: false
topic: tp_Global_AIS_Signal
send-chunk-size: 5000
fail-on-send-error: false
# AIS Target 캐시 설정
ais-target-cache:
ttl-minutes: 120 # 캐시 TTL (분) - 2시간
max-size: 300000 # 최대 캐시 크기 - 30만 건
# ClassType 분류 설정
class-type:
refresh-hour: 4 # Core20 캐시 갱신 시간 (기본: 04시)
# Core20 캐시 테이블 설정 (환경별로 테이블/컬럼명이 다를 수 있음)
core20:
schema: std_snp_svc # 스키마명
table: tb_ship_main_info # 테이블명
imo-column: imo_no # IMO/LRNO 컬럼명 (PK, NOT NULL)
mmsi-column: mmsi_no # MMSI 컬럼명 (NULLABLE)
# 파티션 관리 설정
partition:
# 일별 파티션 테이블 목록 (네이밍: {table}_YYMMDD)
daily-tables:
- schema: std_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일 보관

파일 보기

@ -150,13 +150,11 @@ app:
name: std_snp_svc name: std_snp_svc
tables: tables:
service-001: tb_ship_main_info service-001: tb_ship_main_info
api: api-auth:
url: https://api.example.com/data
timeout: 30000
ship-api:
url: https://shipsapi.maritime.spglobal.com
username: 7cc0517d-5ed6-452e-a06f-5bbfd6ab6ade username: 7cc0517d-5ed6-452e-a06f-5bbfd6ab6ade
password: 2LLzSJNqtxWVD8zC password: 2LLzSJNqtxWVD8zC
ship-api:
url: https://shipsapi.maritime.spglobal.com
ais-api: ais-api:
url: https://aisapi.maritime.spglobal.com url: https://aisapi.maritime.spglobal.com
webservice-api: webservice-api: