Class DefaultBatchConfigurer
java.lang.Object
org.springframework.batch.core.configuration.annotation.DefaultBatchConfigurer
- All Implemented Interfaces:
BatchConfigurer
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultBatchConfigurer
(DataSource dataSource) Create a newDefaultBatchConfigurer
with the passed datasource.DefaultBatchConfigurer
(DataSource dataSource, org.springframework.transaction.PlatformTransactionManager transactionManager) Create a newDefaultBatchConfigurer
with the passed datasource and transaction manager. -
Method Summary
Modifier and TypeMethodDescriptionprotected JobExplorer
protected JobLauncher
protected JobRepository
org.springframework.transaction.PlatformTransactionManager
void
void
setDataSource
(DataSource dataSource) Sets the dataSource.
-
Constructor Details
-
DefaultBatchConfigurer
Create a newDefaultBatchConfigurer
with the passed datasource. This constructor will configure a defaultDataSourceTransactionManager
.- Parameters:
dataSource
- to use for the job repository and job explorer
-
DefaultBatchConfigurer
public DefaultBatchConfigurer(DataSource dataSource, org.springframework.transaction.PlatformTransactionManager transactionManager) Create a newDefaultBatchConfigurer
with the passed datasource and transaction manager.- Parameters:
dataSource
- to use for the job repository and job explorertransactionManager
- to use for the job repository
-
-
Method Details
-
setDataSource
Sets the dataSource.- Parameters:
dataSource
- The data source to use. Must not benull
.
-
getDataSource
-
getJobRepository
- Specified by:
getJobRepository
in interfaceBatchConfigurer
-
getTransactionManager
public org.springframework.transaction.PlatformTransactionManager getTransactionManager()- Specified by:
getTransactionManager
in interfaceBatchConfigurer
-
getJobLauncher
- Specified by:
getJobLauncher
in interfaceBatchConfigurer
-
getJobExplorer
- Specified by:
getJobExplorer
in interfaceBatchConfigurer
-
initialize
@PostConstruct public void initialize() -
createJobLauncher
- Throws:
Exception
-
createJobRepository
- Throws:
Exception
-
createJobExplorer
- Throws:
Exception
-