Compare commits

..

No commits in common. "4e81d7909d5760934341fb8df63c2995aa731eb8" and "0c9018e9b0298b99a0845213f12c53f00395559a" have entirely different histories.

2 changed files with 11 additions and 8 deletions

View File

@ -26,20 +26,23 @@ 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);
factory.setDatabaseType("sqlserver");
// 테이블 prefix 설정
factory.setTablePrefix("BATCH_");
// 격리 레벨 설정
factory.setIsolationLevelForCreate("ISOLATION_READ_COMMITTED");
// 시퀀스 없이 max(id)+1 방식으로 증가
factory.setIncrementerFactory(new DefaultDataFieldMaxValueIncrementerFactory(dataSource));
// SQL Server 데이터베이스 타입 설정
//factory.setDatabaseType(DatabaseType.SQLSERVER.getProductName());
factory.setDatabaseType("sqlserver");
factory.afterPropertiesSet();
return factory.getObject();
return factory.getObject();
}
/**

View File

@ -24,7 +24,7 @@ spring:
schema:
job:
names: ${job.name:NONE}
enabled: true
enabled: false
profiles:
scheduler: Y
batch: