Class SimpleBatchConfiguration
java.lang.Object
org.springframework.batch.core.configuration.annotation.AbstractBatchConfiguration
org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.annotation.ImportAware
@Configuration(proxyBeanMethods=false)
public class SimpleBatchConfiguration
extends AbstractBatchConfiguration
Base
Configuration
class providing common structure for enabling and using Spring Batch. Customization is
available by implementing the BatchConfigurer
interface. The main components are created as lazy proxies that
only initialize when a method is called. This is to prevent (as much as possible) configuration cycles from
developing when these components are needed in a configuration resource that itself provides a
BatchConfigurer
.- Since:
- 2.2
- Author:
- Dave Syer, Mahmoud Ben Hassine
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Sets up the basic components by extracting them from theconfigurer
, defaulting to some sensible values as long as a unique DataSource is available.org.springframework.transaction.PlatformTransactionManager
Methods inherited from class org.springframework.batch.core.configuration.annotation.AbstractBatchConfiguration
afterPropertiesSet, getConfigurer, jobBuilders, setImportMetadata, stepBuilders
-
Constructor Details
-
SimpleBatchConfiguration
public SimpleBatchConfiguration()
-
-
Method Details
-
jobRepository
- Specified by:
jobRepository
in classAbstractBatchConfiguration
- Throws:
Exception
-
jobLauncher
- Specified by:
jobLauncher
in classAbstractBatchConfiguration
- Throws:
Exception
-
jobRegistry
- Overrides:
jobRegistry
in classAbstractBatchConfiguration
- Throws:
Exception
-
jobExplorer
- Specified by:
jobExplorer
in classAbstractBatchConfiguration
-
transactionManager
public org.springframework.transaction.PlatformTransactionManager transactionManager() throws Exception- Specified by:
transactionManager
in classAbstractBatchConfiguration
- Throws:
Exception
-
initialize
Sets up the basic components by extracting them from theconfigurer
, defaulting to some sensible values as long as a unique DataSource is available.- Throws:
Exception
- if there is a problem in the configurer
-