배치 2007 설정 수정 #93
@ -26,23 +26,20 @@ public class BatchConfiguration {
|
|||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@Primary
|
@Primary
|
||||||
public JobRepository jobRepository(DataSource dataSource, PlatformTransactionManager transactionManager) throws Exception {
|
public JobRepository jobRepository(DataSource dataSource,
|
||||||
|
PlatformTransactionManager transactionManager) throws Exception {
|
||||||
JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
|
JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
|
||||||
factory.setDataSource(dataSource);
|
factory.setDataSource(dataSource);
|
||||||
factory.setTransactionManager(transactionManager);
|
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.setDatabaseType("sqlserver");
|
||||||
factory.afterPropertiesSet();
|
factory.setIsolationLevelForCreate("ISOLATION_READ_COMMITTED");
|
||||||
|
|
||||||
|
// 시퀀스 없이 max(id)+1 방식으로 증가
|
||||||
|
factory.setIncrementerFactory(new DefaultDataFieldMaxValueIncrementerFactory(dataSource));
|
||||||
|
|
||||||
|
factory.afterPropertiesSet();
|
||||||
return factory.getObject();
|
return factory.getObject();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -24,7 +24,7 @@ spring:
|
|||||||
schema:
|
schema:
|
||||||
job:
|
job:
|
||||||
names: ${job.name:NONE}
|
names: ${job.name:NONE}
|
||||||
enabled: false
|
enabled: true
|
||||||
profiles:
|
profiles:
|
||||||
scheduler: Y
|
scheduler: Y
|
||||||
batch:
|
batch:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user