FINERACT-1724: Jakarta namespace introduction + relevant upgrades + EclipseLink 4 upgrade along with Spring Boot 3
This commit is contained in:
committed by
Arnold Gálovics
parent
84abf365c8
commit
bc4b707646
+8
-7
@@ -20,31 +20,32 @@ package com.acme.fineract.loan.job;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.Step;
|
||||
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
|
||||
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
|
||||
import org.springframework.batch.core.job.builder.JobBuilder;
|
||||
import org.springframework.batch.core.launch.support.RunIdIncrementer;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
import org.springframework.batch.core.step.builder.StepBuilder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@Configuration
|
||||
public class AcmeNoopJobConfiguration {
|
||||
|
||||
@Autowired
|
||||
private JobBuilderFactory jobs;
|
||||
private JobRepository jobRepository;
|
||||
@Autowired
|
||||
private StepBuilderFactory steps;
|
||||
private PlatformTransactionManager transactionManager;
|
||||
@Autowired
|
||||
private AcmeNoopJobTasklet tasklet;
|
||||
|
||||
@Bean
|
||||
protected Step acmeNoopJobStep() {
|
||||
return steps.get(AcmeJobName.ACME_NOOP_JOB.name()).tasklet(tasklet).build();
|
||||
return new StepBuilder(AcmeJobName.ACME_NOOP_JOB.name(), jobRepository).tasklet(tasklet, transactionManager).build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Job acmeNoopJob() {
|
||||
return jobs.get(AcmeJobName.ACME_NOOP_JOB.name()).start(acmeNoopJobStep()).incrementer(new RunIdIncrementer()).build();
|
||||
return new JobBuilder(AcmeJobName.ACME_NOOP_JOB.name(), jobRepository).start(acmeNoopJobStep()).incrementer(new RunIdIncrementer()).build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user