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 ObjectThe ApplicationDataSourceConfiguration class provides access to the application data source configuration and initialises the application data source.- Author:
- Marcus Portmann
-
-
Constructor Summary
Constructors Constructor Description ApplicationDataSourceConfiguration(org.springframework.context.ApplicationContext applicationContext)Constructs a new ApplicationDataSourceConfiguration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourceapplicationDataSource()Returns the data source that can be used to interact with the application database.StringgetClassName()Returns the fully qualified name of the data source class used to connect to the application database.intgetMaxPoolSize()Returns the maximum size of the database connection pool used to connect to the application database.intgetMinPoolSize()Returns the minimum size of the database connection pool used to connect to the application database.StringgetPassword()Returns the password for the application database.StringgetUrl()Returns the URL used to connect to the application database.StringgetUsername()Returns the username for the application database.
-
-
-
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
-
-