public class OpenHubDatabaseConfiguration extends AbstractDatabaseConfig
DataSource
OpenHub provider for domain database.Constructor and Description |
---|
OpenHubDatabaseConfiguration() |
Modifier and Type | Method and Description |
---|---|
DataSource |
dataSource()
Creates
DataSource that represents source to OpenHub database. |
com.zaxxer.hikari.HikariConfig |
hikariConfig() |
org.springframework.jdbc.core.JdbcOperations |
JdbcOperations(DataSource dataSource)
|
excludeMBeanIfNecessary
@Bean public org.springframework.jdbc.core.JdbcOperations JdbcOperations(@OpenHubDataSource DataSource dataSource)
dataSource
- as OpenHubDataSource
typedatasource
@ConditionalOnMissingBean(name="OpenHubDataSource") @ConditionalOnExpression(value="\'${spring.datasource.jndi-name:}\' != \'\' or \'${spring.datasource.url:}\' != \'\'") @Bean(destroyMethod="", name="OpenHubDataSource") @Primary public DataSource dataSource()
DataSource
that represents source to OpenHub database. This bean is created only when the specified bean classes
and/or names are not already contained. DataSource
is fetched based upon JNDI name if provided, otherwise
based upon URL connection string.dataSource
in class AbstractDatabaseConfig
DataSource
as general OpenHub datasourceOpenHubDataSourceProperties
@Bean @ConfigurationProperties(value="spring.datasource.hikari") public com.zaxxer.hikari.HikariConfig hikariConfig()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.