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:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user