org.springframework.batch.core.configuration.annotation
Class SimpleBatchConfiguration

java.lang.Object
  extended by org.springframework.batch.core.configuration.annotation.AbstractBatchConfiguration
      extended by org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.annotation.ImportAware

@Configuration
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
See Also:
EnableBatchProcessing

Constructor Summary
SimpleBatchConfiguration()
           
 
Method Summary
protected  void initialize()
          Sets up the basic components by extracting them from the configurer, defaulting to some sensible values as long as a unique DataSource is available.
 JobLauncher jobLauncher()
           
 JobRegistry jobRegistry()
           
 JobRepository jobRepository()
           
 org.springframework.transaction.PlatformTransactionManager transactionManager()
           
 
Methods inherited from class org.springframework.batch.core.configuration.annotation.AbstractBatchConfiguration
getConfigurer, jobBuilders, setImportMetadata, stepBuilders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleBatchConfiguration

public SimpleBatchConfiguration()
Method Detail

jobRepository

@Bean
public JobRepository jobRepository()
                            throws Exception
Specified by:
jobRepository in class AbstractBatchConfiguration
Throws:
Exception

jobLauncher

@Bean
public JobLauncher jobLauncher()
                        throws Exception
Specified by:
jobLauncher in class AbstractBatchConfiguration
Throws:
Exception

jobRegistry

@Bean
public JobRegistry jobRegistry()
                        throws Exception
Overrides:
jobRegistry in class AbstractBatchConfiguration
Throws:
Exception

transactionManager

@Bean
public org.springframework.transaction.PlatformTransactionManager transactionManager()
                                                                              throws Exception
Specified by:
transactionManager in class AbstractBatchConfiguration
Throws:
Exception

initialize

protected void initialize()
                   throws Exception
Sets up the basic components by extracting them from the configurer, defaulting to some sensible values as long as a unique DataSource is available.

Throws:
Exception - if there is a problem in the configurer


Copyright © 2013 SpringSource. All Rights Reserved.