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
ABasicBatchConfigurertailored for JPA.
Constructor Summary
Constructors Modifier Constructor Description protectedJpaBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers, javax.persistence.EntityManagerFactory entityManagerFactory)Create a newBasicBatchConfigurerinstance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.transaction.PlatformTransactionManagercreateTransactionManager()protected StringdetermineIsolationLevel()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 newBasicBatchConfigurerinstance.- 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:BasicBatchConfigurerDetermine the isolation level for create* operation of theJobRepository.- Overrides:
determineIsolationLevelin classBasicBatchConfigurer- Returns:
- the isolation level or
nullto use the default
createTransactionManager
protected org.springframework.transaction.PlatformTransactionManager createTransactionManager()
- Overrides:
createTransactionManagerin classBasicBatchConfigurer