OctaviusSpringAutoConfiguration

@AutoConfiguration(after = [DataSourceAutoConfiguration::class, TransactionManagerCustomizationAutoConfiguration::class], before = [DataSourceTransactionManagerAutoConfiguration::class, TransactionAutoConfiguration::class])
@ConditionalOnClass(value = [OctaviusSession::class, DataSource::class])
@ConditionalOnSingleCandidate(value = DataSource::class)
open class OctaviusSpringAutoConfiguration

Spring Boot auto-configuration for the Octavius driver.

Contributes an OctaviusTemplate and an OctaviusJdbcTransactionManager, each only where the context declares none of its own - any TransactionManager counting for the second. It runs after Boot's TransactionManagerCustomizationAutoConfiguration, whose customizers it applies, and before the transaction manager Boot would make. Like Boot's own JDBC auto-configuration, it contributes nothing with several DataSource beans and none of them primary.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
@Bean
@ConditionalOnMissingBean
open fun octaviusTemplate(dataSource: DataSource): OctaviusTemplate

An OctaviusTemplate, unless the context has one.

Link copied to clipboard
@Bean
@ConditionalOnMissingBean(value = [TransactionManager::class])
open fun transactionManager(dataSource: DataSource, customizers: ObjectProvider<TransactionManagerCustomizers>): OctaviusJdbcTransactionManager

An OctaviusJdbcTransactionManager, unless the context declares a TransactionManager of its own - JDBC, JPA or reactive alike, as for Boot's. Declared as the class it is, so a bean created before it can inject it by that type.