@Configuration @Profile(value="external") public class ExternalDataSourceConfiguration extends Object
Constructor and Description |
---|
ExternalDataSourceConfiguration() |
Modifier and Type | Method and Description |
---|---|
DataSource |
dataSource(org.springframework.boot.autoconfigure.jdbc.DataSourceProperties springDataSourceProperties) |
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties |
myDataSourceProperties() |
DataSource |
secondDataSource(org.springframework.boot.autoconfigure.jdbc.DataSourceProperties secondDataSourceProperties) |
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties |
springDataSourceProperties() |
@Bean(name="springDataSourceProperties") @ConfigurationProperties(value="spring.datasource") @Primary public org.springframework.boot.autoconfigure.jdbc.DataSourceProperties springDataSourceProperties()
@Bean(name="secondDataSourceProperties") @ConfigurationProperties(value="second.datasource") public org.springframework.boot.autoconfigure.jdbc.DataSourceProperties myDataSourceProperties()
@Bean(name="springDataSource") @Primary public DataSource dataSource(@Qualifier(value="springDataSourceProperties") org.springframework.boot.autoconfigure.jdbc.DataSourceProperties springDataSourceProperties)
@Bean public DataSource secondDataSource(@Qualifier(value="secondDataSourceProperties") org.springframework.boot.autoconfigure.jdbc.DataSourceProperties secondDataSourceProperties)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.