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
,InitializingBean
A
BasicBatchConfigurer
tailored for JPA.- Since:
- 2.0.0
- Author:
- Stephane Nicoll
-
Constructor Summary
ModifierConstructorDescriptionprotected
JpaBatchConfigurer
(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers, EntityManagerFactory entityManagerFactory) Create a newBasicBatchConfigurer
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected PlatformTransactionManager
protected String
Determine the isolation level for create* operation of theJobRepository
.Methods inherited from class org.springframework.boot.autoconfigure.batch.BasicBatchConfigurer
afterPropertiesSet, createJobExplorer, createJobLauncher, createJobRepository, getJobExplorer, getJobLauncher, getJobRepository, getTransactionManager, initialize
-
Constructor Details
-
JpaBatchConfigurer
protected JpaBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers, 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 Details
-
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
- Overrides:
createTransactionManager
in classBasicBatchConfigurer
-