DataSourceAutoConfiguration

@AutoConfiguration(before = [WowAutoConfiguration::class])
@ConditionalOnClass(name = ["com.zaxxer.hikari.HikariDataSource"])
@ConditionalOnMissingClass(value = ["org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration"])
@ConditionalOnProperty(prefix = "spring.datasource", name = ["url"])
class DataSourceAutoConfiguration

The application's database connection pool, from its properties alone: when spring.datasource.url is set, HikariCP is on the class path, the application has no DataSource bean and no Spring Boot JDBC (spring-boot-jdbc, whose own auto-configuration then makes it), the host makes a HikariDataSource of spring.datasource.url, .username, .password and .driver-class-name, with HikariCP's settings under spring.datasource.hikari.* as Boot reads them; closed with the context. Its pool opens at the first connection. The backend then follows the DataSource bean as it follows the application's (wow.backend); without the URL the host connects to no database.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
@Bean(destroyMethod = "close")
@ConditionalOnMissingBean(value = [DataSource::class])
fun wowDataSource(environment: Environment): HikariDataSource