Class IridaApiJdbcDataSourceConfig
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.config.data.IridaApiJdbcDataSourceConfig
-
@Configuration @EntityScan(basePackages={"ca.corefacility.bioinformatics.irida.model","ca.corefacility.bioinformatics.irida.repositories.relational.auditing"}) public class IridaApiJdbcDataSourceConfig extends java.lang.Object
Configuration for IRIDA's JDBC Datasource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IridaApiJdbcDataSourceConfig.ApplicationContextAwareSpringLiquibase
Custom implementation of the SpringLiquibase bean (for doing liquibase on spring startup) that exposes the application context so that we can have access to the application context in custom java changesets.
-
Constructor Summary
Constructors Constructor Description IridaApiJdbcDataSourceConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description liquibase.integration.spring.SpringLiquibase
springLiquibase(javax.sql.DataSource dataSource, org.springframework.context.ApplicationContext applicationContext)
Create an instance ofSpringLiquibase
to update the database schema with liquibase change sets.
-
-
-
Method Detail
-
springLiquibase
@Bean public liquibase.integration.spring.SpringLiquibase springLiquibase(javax.sql.DataSource dataSource, org.springframework.context.ApplicationContext applicationContext)
Create an instance ofSpringLiquibase
to update the database schema with liquibase change sets. This bean should only be invoked in a production/dev environment and should *not* be invoked if Hibernate is going to be creating the database schema. The scenario should not come up, however we will test to see if Hibernate is set to generate a schema before executing.- Parameters:
dataSource
- the connection to use to migrate the databaseapplicationContext
- the Spring Application Context- Returns:
- an instance of
SpringLiquibase
.
-
-