배치 itemReader 변경

This commit is contained in:
rjy1537 2024-11-11 13:31:56 +09:00
parent f8a194edd0
commit 030fbb6248
4 changed files with 4 additions and 8 deletions

View File

@ -14,7 +14,6 @@ import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.builder.StepBuilder; import org.springframework.batch.core.step.builder.StepBuilder;
import org.springframework.batch.item.ItemProcessor; import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter; import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.ListItemReader; import org.springframework.batch.item.support.ListItemReader;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -58,7 +57,7 @@ public class BomConfiguration implements JobExecutionListener {
@Bean @Bean
@StepScope @StepScope
public ItemReader<BomSyncResponse> bomReader() throws Exception { public ListItemReader<BomSyncResponse> bomReader() throws Exception {
this.bomSyncList = this.bomSyncList =
interfaceQsp.callApiData( interfaceQsp.callApiData(
HttpMethod.GET, qspInterfaceUrl, null, new TypeReference<List<BomSyncResponse>>() {}); HttpMethod.GET, qspInterfaceUrl, null, new TypeReference<List<BomSyncResponse>>() {});

View File

@ -15,7 +15,6 @@ import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.builder.StepBuilder; import org.springframework.batch.core.step.builder.StepBuilder;
import org.springframework.batch.item.ItemProcessor; import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter; import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.ListItemReader; import org.springframework.batch.item.support.ListItemReader;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -59,7 +58,7 @@ public class MaterialConfiguration implements JobExecutionListener {
@Bean @Bean
@StepScope @StepScope
public ItemReader<ItemSyncResponse> materialReader() throws Exception { public ListItemReader<ItemSyncResponse> materialReader() throws Exception {
ItemSyncRequest itemSyncRequest = new ItemSyncRequest(); ItemSyncRequest itemSyncRequest = new ItemSyncRequest();
itemSyncRequest.setAllYn("N"); itemSyncRequest.setAllYn("N");
this.itemSyncList = this.itemSyncList =

View File

@ -14,7 +14,6 @@ import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.builder.StepBuilder; import org.springframework.batch.core.step.builder.StepBuilder;
import org.springframework.batch.item.ItemProcessor; import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter; import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.ListItemReader; import org.springframework.batch.item.support.ListItemReader;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -58,7 +57,7 @@ public class AdminUserConfiguration implements JobExecutionListener {
@Bean @Bean
@StepScope @StepScope
public ItemReader<AdminUserSyncResponse> adminUserReader() throws Exception { public ListItemReader<AdminUserSyncResponse> adminUserReader() throws Exception {
this.adminUserSyncList = this.adminUserSyncList =
interfaceQsp.callApiData( interfaceQsp.callApiData(
HttpMethod.GET, HttpMethod.GET,

View File

@ -14,7 +14,6 @@ import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.builder.StepBuilder; import org.springframework.batch.core.step.builder.StepBuilder;
import org.springframework.batch.item.ItemProcessor; import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter; import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.ListItemReader; import org.springframework.batch.item.support.ListItemReader;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -58,7 +57,7 @@ public class BusinessChargerConfiguration implements JobExecutionListener {
@Bean @Bean
@StepScope @StepScope
public ItemReader<BusinessChargerSyncResponse> businessChargerReader() throws Exception { public ListItemReader<BusinessChargerSyncResponse> businessChargerReader() throws Exception {
this.businessChargerSyncList = this.businessChargerSyncList =
interfaceQsp.callApiData( interfaceQsp.callApiData(
HttpMethod.GET, HttpMethod.GET,