Class ApplicationDataSourceConfiguration
java.lang.Object
africa.absa.inception.application.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 Summary
ConstructorsConstructorDescriptionApplicationDataSourceConfiguration(org.springframework.context.ApplicationContext applicationContext) Constructs a new ApplicationDataSourceConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the data source that can be used to interact with the application database.Returns the fully qualified name of the data source class used to connect to the application database.intReturns the maximum size of the database connection pool used to connect to the application database.intReturns the minimum size of the database connection pool used to connect to the application database.Returns the password for the application database.getUrl()Returns the URL used to connect to the application database.Returns the username for the application database.
-
Constructor Details
-
ApplicationDataSourceConfiguration
public ApplicationDataSourceConfiguration(org.springframework.context.ApplicationContext applicationContext) Constructs a new ApplicationDataSourceConfiguration.- Parameters:
applicationContext- the Spring application context
-
-
Method Details
-
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
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
Returns the password for the application database.- Returns:
- the password for the application database
-
getUrl
Returns the URL used to connect to the application database.- Returns:
- the URL used to connect to the application database
-
getUsername
Returns the username for the application database.- Returns:
- the username for the application database
-