Class ExternalDataSourceConfiguration

java.lang.Object
io.spring.configuration.ExternalDataSourceConfiguration

@Configuration(proxyBeanMethods=false) @Profile("external") public class ExternalDataSourceConfiguration extends Object
Creates two data sources that use external databases.
Author:
Glenn Renfro
  • Constructor Details

    • ExternalDataSourceConfiguration

      public ExternalDataSourceConfiguration()
  • Method Details

    • springDataSourceProperties

      @Bean(name="springDataSourceProperties") @ConfigurationProperties("spring.datasource") @Primary public org.springframework.boot.autoconfigure.jdbc.DataSourceProperties springDataSourceProperties()
    • myDataSourceProperties

      @Bean(name="secondDataSourceProperties") @ConfigurationProperties("second.datasource") public org.springframework.boot.autoconfigure.jdbc.DataSourceProperties myDataSourceProperties()
    • dataSource

      @Bean(name="springDataSource") @Primary public DataSource dataSource(@Qualifier("springDataSourceProperties") org.springframework.boot.autoconfigure.jdbc.DataSourceProperties springDataSourceProperties)
    • secondDataSource

      @Bean public DataSource secondDataSource(@Qualifier("secondDataSourceProperties") org.springframework.boot.autoconfigure.jdbc.DataSourceProperties secondDataSourceProperties)