Class InMemoryBatchConfigurer
- java.lang.Object
-
- com.github.marschall.spring.batch.inmemory.InMemoryBatchConfigurer
-
- All Implemented Interfaces:
BatchConfigurer
@Component public class InMemoryBatchConfigurer extends Object implements BatchConfigurer
ABatchConfigurer
for use withAbstractBatchConfiguration
that sets up Spring Batch with a in-memoryJobRepository
andJobExplorer
.Requires a
PlatformTransactionManager
is defined somewhere.
-
-
Constructor Summary
Constructors Constructor Description InMemoryBatchConfigurer(PlatformTransactionManager transactionManager)
Constructs a newInMemoryBatchConfigurer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobExplorer
getJobExplorer()
JobLauncher
getJobLauncher()
JobRepository
getJobRepository()
PlatformTransactionManager
getTransactionManager()
-
-
-
Constructor Detail
-
InMemoryBatchConfigurer
public InMemoryBatchConfigurer(PlatformTransactionManager transactionManager)
Constructs a newInMemoryBatchConfigurer
.- Parameters:
transactionManager
- the transaction manager to use, should be the transaction manager used by the tests, if you tests don't or need a transaction manager then useResourcelessTransactionManager
, notnull
-
-
Method Detail
-
getJobExplorer
public JobExplorer getJobExplorer()
- Specified by:
getJobExplorer
in interfaceBatchConfigurer
-
getJobRepository
public JobRepository getJobRepository()
- Specified by:
getJobRepository
in interfaceBatchConfigurer
-
getTransactionManager
public PlatformTransactionManager getTransactionManager()
- Specified by:
getTransactionManager
in interfaceBatchConfigurer
-
getJobLauncher
public JobLauncher getJobLauncher() throws Exception
- Specified by:
getJobLauncher
in interfaceBatchConfigurer
- Throws:
Exception
-
-