Merge pull request '배치 2007 설정 수정' (#93) from feature/cha into dev
Reviewed-on: #93
This commit is contained in:
commit
4e81d7909d
@ -26,23 +26,20 @@ public class BatchConfiguration {
|
||||
*/
|
||||
@Bean
|
||||
@Primary
|
||||
public JobRepository jobRepository(DataSource dataSource, PlatformTransactionManager transactionManager) throws Exception {
|
||||
public JobRepository jobRepository(DataSource dataSource,
|
||||
PlatformTransactionManager transactionManager) throws Exception {
|
||||
JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
|
||||
factory.setDataSource(dataSource);
|
||||
factory.setTransactionManager(transactionManager);
|
||||
|
||||
// 테이블 prefix 설정
|
||||
factory.setTablePrefix("BATCH_");
|
||||
|
||||
// 격리 레벨 설정
|
||||
factory.setIsolationLevelForCreate("ISOLATION_READ_COMMITTED");
|
||||
factory.setIncrementerFactory(new DefaultDataFieldMaxValueIncrementerFactory(dataSource));
|
||||
// SQL Server 데이터베이스 타입 설정
|
||||
//factory.setDatabaseType(DatabaseType.SQLSERVER.getProductName());
|
||||
factory.setDatabaseType("sqlserver");
|
||||
factory.afterPropertiesSet();
|
||||
factory.setIsolationLevelForCreate("ISOLATION_READ_COMMITTED");
|
||||
|
||||
// 시퀀스 없이 max(id)+1 방식으로 증가
|
||||
factory.setIncrementerFactory(new DefaultDataFieldMaxValueIncrementerFactory(dataSource));
|
||||
|
||||
factory.afterPropertiesSet();
|
||||
return factory.getObject();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -24,7 +24,7 @@ spring:
|
||||
schema:
|
||||
job:
|
||||
names: ${job.name:NONE}
|
||||
enabled: false
|
||||
enabled: true
|
||||
profiles:
|
||||
scheduler: Y
|
||||
batch:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user