dev #92

Merged
ysCha merged 2 commits from dev into dev-deploy 2025-06-17 14:27:45 +09:00
Showing only changes of commit 0c9018e9b0 - Show all commits

View File

@ -5,6 +5,7 @@ import javax.sql.DataSource;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.repository.support.JobRepositoryFactoryBean;
import org.springframework.batch.item.database.support.DefaultDataFieldMaxValueIncrementerFactory;
import org.springframework.batch.support.DatabaseType;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -34,12 +35,13 @@ public class BatchConfiguration {
factory.setTablePrefix("BATCH_");
// 격리 레벨 설정
factory.setIsolationLevelForCreate("ISOLATION_SERIALIZABLE");
factory.setIsolationLevelForCreate("ISOLATION_READ_COMMITTED");
factory.setIncrementerFactory(new DefaultDataFieldMaxValueIncrementerFactory(dataSource));
// SQL Server 데이터베이스 타입 설정
//factory.setDatabaseType(DatabaseType.SQLSERVER.getProductName());
factory.setDatabaseType("sqlserver");
factory.afterPropertiesSet();
return factory.getObject();
}