Class ApplicationDataSourceConfiguration


  • @Configuration
    @EnableAutoConfiguration(exclude={org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class,org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration.class})
    @ConditionalOnProperty({"inception.application.data-source.class-name","inception.application.data-source.url"})
    public class ApplicationDataSourceConfiguration
    extends Object
    The ApplicationDataSourceConfiguration class provides access to the application data source configuration and initialises the application data source.
    Author:
    Marcus Portmann
    • Constructor Detail

      • ApplicationDataSourceConfiguration

        public ApplicationDataSourceConfiguration​(org.springframework.context.ApplicationContext applicationContext)
        Constructs a new ApplicationDataSourceConfiguration.
        Parameters:
        applicationContext - the Spring application context
    • Method Detail

      • applicationDataSource

        @Bean
        @Primary
        public DataSource applicationDataSource()
        Returns the data source that can be used to interact with the application database.
        Returns:
        the data source that can be used to interact with the in-memory database
      • getClassName

        public String getClassName()
        Returns the fully qualified name of the data source class used to connect to the application database.
        Returns:
        the fully qualified name of the data source class used to connect to the application database
      • getMaxPoolSize

        public int getMaxPoolSize()
        Returns the maximum size of the database connection pool used to connect to the application database.
        Returns:
        the maximum size of the database connection pool used to connect to the application database
      • getMinPoolSize

        public int getMinPoolSize()
        Returns the minimum size of the database connection pool used to connect to the application database.
        Returns:
        the minimum size of the database connection pool used to connect to the application database
      • getPassword

        public String getPassword()
        Returns the password for the application database.
        Returns:
        the password for the application database
      • getUrl

        public String getUrl()
        Returns the URL used to connect to the application database.
        Returns:
        the URL used to connect to the application database
      • getUsername

        public String getUsername()
        Returns the username for the application database.
        Returns:
        the username for the application database