Package io.spring.configuration

# 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 Summary

  Constructors
  Constructor
  Description
  `ExternalDataSourceConfiguration()`

- ## Method Summary

  Modifier and Type
  Method
  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()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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)