Package org.springframework.batch.core.configuration.annotation

# 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:
  - `EnableBatchProcessing`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleBatchConfiguration()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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.
  `JobExplorer`
  `jobExplorer()`
  `JobLauncher`
  `jobLauncher()`
  `JobRegistry`
  `jobRegistry()`
  `JobRepository`
  `jobRepository()`
  `org.springframework.transaction.PlatformTransactionManager`
  `transactionManager()`

  ### Methods inherited from class org.springframework.batch.core.configuration.annotation.AbstractBatchConfiguration

  `afterPropertiesSet, getConfigurer, jobBuilders, setImportMetadata, stepBuilders`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SimpleBatchConfiguration

    public SimpleBatchConfiguration()

- ## Method Details

  - ### 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`

  - ### jobExplorer

    @Bean public JobExplorer jobExplorer()
    Specified by:
      `jobExplorer` in class `AbstractBatchConfiguration`

  - ### transactionManager

    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