Class DefaultBatchConfigurer
java.lang.Object
org.springframework.batch.core.configuration.annotation.DefaultBatchConfigurer
- All Implemented Interfaces:
BatchConfigurer
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultBatchConfigurer(DataSource dataSource) Create a newDefaultBatchConfigurerwith the passed datasource.DefaultBatchConfigurer(DataSource dataSource, org.springframework.transaction.PlatformTransactionManager transactionManager) Create a newDefaultBatchConfigurerwith the passed datasource and transaction manager. -
Method Summary
Modifier and TypeMethodDescriptionprotected JobExplorerprotected JobLauncherprotected JobRepositoryorg.springframework.transaction.PlatformTransactionManagervoidvoidsetDataSource(DataSource dataSource) Sets the dataSource.
-
Constructor Details
-
DefaultBatchConfigurer
Create a newDefaultBatchConfigurerwith 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 newDefaultBatchConfigurerwith 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:
getJobRepositoryin interfaceBatchConfigurer
-
getTransactionManager
public org.springframework.transaction.PlatformTransactionManager getTransactionManager()- Specified by:
getTransactionManagerin interfaceBatchConfigurer
-
getJobLauncher
- Specified by:
getJobLauncherin interfaceBatchConfigurer
-
getJobExplorer
- Specified by:
getJobExplorerin interfaceBatchConfigurer
-
initialize
@PostConstruct public void initialize() -
createJobLauncher
- Throws:
Exception
-
createJobRepository
- Throws:
Exception
-
createJobExplorer
- Throws:
Exception
-