fix: Spring Batch MySQL 시퀀스 채번 오류 수정 (BATCH_JOB_INSTANCE Duplicate entry 0)

- GconeSourceConfig.jobRepository: setDatabaseType(MYSQL) 추가
- application-dev.yaml: spring.batch.jdbc.initialize-schema=always 추가 (BATCH_JOB_SEQ 등 시퀀스 테이블 자동 생성)
This commit is contained in:
이주일
2026-05-23 11:17:18 +09:00
parent f46f0ad597
commit 0bf03de005
2 changed files with 5 additions and 4 deletions

View File

@@ -66,9 +66,8 @@ public class GconeSourceConfig {
JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean(); JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
factory.setDataSource(gconeDataSource); factory.setDataSource(gconeDataSource);
factory.setTransactionManager(transactionManager); factory.setTransactionManager(transactionManager);
factory.setDatabaseType("MYSQL");
factory.afterPropertiesSet(); factory.afterPropertiesSet();
return factory.getObject(); return factory.getObject();
} }
} }

View File

@@ -15,6 +15,8 @@ spring:
username: sakeone username: sakeone
password: dnlfxjtm13@$ password: dnlfxjtm13@$
batch: batch:
jdbc:
initialize-schema: always
job: job:
enabled: false enabled: false
mybatis: mybatis: