Skip to content
Advertisement

Tag: spring-batch

How Spring Batch Step chunkSize and JpaPagingItemReader pageSize work together

Im developing a Spring Batch application. Although I’m getting more and more comfortable with it, I came across with something that is making me very confused. Please take a look at this step configuration. As you can see it’s a pretty standard step. My confusion is related to the chunk size (50) and the reader (processNonExportedMbfsOperationsItemReader). Reader code next: The

How to inject ObjectMapper in spring

I have a batch job written using Spring Batch I have a config file below: I have Json Line aggregator as below: I want to inject objectMapper and don’t want to create it inside the JsonLineAggregator class. Any idea how can I implement it using DI ? Answer You can use @Autowired annotation to inject the dependency in spring like

The dependencies of some of the beans in the application context form a cycle in Spring Batch

I’m working on a simple Spring Batch application, and when I finished configuring it, I found that problem: The dependencies of some of the beans in the application context form a cycle: jobRestController defined in file [/home/yassine/Downloads/demo/target/classes/com/example/demo/JobRestController.class] springBatchConfig defined in file [/home/yassine/Downloads/demo/target/classes/com/example/demo/SpringBatchConfig.class] Action: Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove

Error creating bean with name ‘batchDataSource’: Requested bean is currently in creation: Is there an unresolvable circular reference?

I have a batch configuration. I saw the batch process is default using InMemoryMap. Instead I need to use the MySQL to send all the execution details by Batch. But when I use the following code I am getting the following error, Error creating bean with name ‘batchDataSource’: Requested bean is currently in creation: Is there an unresolvable circular reference?

@Retryable with @Scheduled don’t fire

I’ve written a Spring Boot Application where I’ve enabled Spring Batch Scheduling and Retriable as follow: I’ve defined a controller as follow: After 2 minutes, as the cron expression specified starts the job, so in the first step of it I’ll send it in exception so in the job execution and step I’ve tracked the FAILED status. So, as the

Advertisement