Class JpaBatchConfigurer
- java.lang.Object
- org.springframework.boot.autoconfigure.batch.BasicBatchConfigurer
- org.springframework.boot.autoconfigure.batch.JpaBatchConfigurer
- All Implemented Interfaces:
org.springframework.batch.core.configuration.annotation.BatchConfigurer
public class JpaBatchConfigurer extends BasicBatchConfigurer
ABasicBatchConfigurer
tailored for JPA.
Constructor Summary
Constructors Modifier Constructor Description protected
JpaBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers, javax.persistence.EntityManagerFactory entityManagerFactory)
Create a newBasicBatchConfigurer
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.transaction.PlatformTransactionManager
createTransactionManager()
protected String
determineIsolationLevel()
Determine the isolation level for create* operation of theJobRepository
.Methods inherited from class org.springframework.boot.autoconfigure.batch.BasicBatchConfigurer
createJobExplorer, createJobLauncher, createJobRepository, getJobExplorer, getJobLauncher, getJobRepository, getTransactionManager, initialize
Constructor Detail
JpaBatchConfigurer
protected JpaBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers, javax.persistence.EntityManagerFactory entityManagerFactory)
Create a newBasicBatchConfigurer
instance.- Parameters:
properties
- the batch propertiesdataSource
- the underlying data sourcetransactionManagerCustomizers
- transaction manager customizers (ornull
)entityManagerFactory
- the entity manager factory (ornull
)
Method Detail
determineIsolationLevel
protected String determineIsolationLevel()
Description copied from class:BasicBatchConfigurer
Determine the isolation level for create* operation of theJobRepository
.- Overrides:
determineIsolationLevel
in classBasicBatchConfigurer
- Returns:
- the isolation level or
null
to use the default
createTransactionManager
protected org.springframework.transaction.PlatformTransactionManager createTransactionManager()
- Overrides:
createTransactionManager
in classBasicBatchConfigurer