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

# Class DefaultBatchConfigurer

java.lang.Object
org.springframework.batch.core.configuration.annotation.DefaultBatchConfigurer

All Implemented Interfaces:
  `BatchConfigurer`

@Component public class DefaultBatchConfigurer extends Object implements BatchConfigurer

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultBatchConfigurer(DataSource dataSource)`
  Create a new `DefaultBatchConfigurer` with the passed datasource.
  `DefaultBatchConfigurer(DataSource dataSource, org.springframework.transaction.PlatformTransactionManager transactionManager)`
  Create a new `DefaultBatchConfigurer` with the passed datasource and transaction manager.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected JobExplorer`
  `createJobExplorer()`
  `protected JobLauncher`
  `createJobLauncher()`
  `protected JobRepository`
  `createJobRepository()`
  `DataSource`
  `getDataSource()`
  `JobExplorer`
  `getJobExplorer()`
  `JobLauncher`
  `getJobLauncher()`
  `JobRepository`
  `getJobRepository()`
  `org.springframework.transaction.PlatformTransactionManager`
  `getTransactionManager()`
  `void`
  `initialize()`
  `void`
  `setDataSource(DataSource dataSource)`
  Sets the dataSource.

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

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

- ## Constructor Details

  - ### DefaultBatchConfigurer

    public DefaultBatchConfigurer(DataSource dataSource)
    Create a new `DefaultBatchConfigurer` with the passed datasource. This constructor will configure a default `DataSourceTransactionManager`.
    Parameters:
      `dataSource` - to use for the job repository and job explorer

  - ### DefaultBatchConfigurer

    public DefaultBatchConfigurer(DataSource dataSource, org.springframework.transaction.PlatformTransactionManager transactionManager)
    Create a new `DefaultBatchConfigurer` with the passed datasource and transaction manager.
    Parameters:
      `dataSource` - to use for the job repository and job explorer
      `transactionManager` - to use for the job repository

- ## Method Details

  - ### setDataSource

    public void setDataSource(DataSource dataSource)
    Sets the dataSource.
    Parameters:
      `dataSource` - The data source to use. Must not be `null`.

  - ### getDataSource

    public DataSource getDataSource()

  - ### getJobRepository

    public JobRepository getJobRepository()
    Specified by:
      `getJobRepository` in interface `BatchConfigurer`

  - ### getTransactionManager

    public org.springframework.transaction.PlatformTransactionManager getTransactionManager()
    Specified by:
      `getTransactionManager` in interface `BatchConfigurer`

  - ### getJobLauncher

    public JobLauncher getJobLauncher()
    Specified by:
      `getJobLauncher` in interface `BatchConfigurer`

  - ### getJobExplorer

    public JobExplorer getJobExplorer()
    Specified by:
      `getJobExplorer` in interface `BatchConfigurer`

  - ### initialize

    @PostConstruct public void initialize()

  - ### createJobLauncher

    protected JobLauncher createJobLauncher() throws Exception
    Throws:
      `Exception`

  - ### createJobRepository

    protected JobRepository createJobRepository() throws Exception
    Throws:
      `Exception`

  - ### createJobExplorer

    protected JobExplorer createJobExplorer() throws Exception
    Throws:
      `Exception`