Package org.powertac.visualizer.config
Class DatabaseConfiguration
java.lang.Object
org.powertac.visualizer.config.DatabaseConfiguration
@Configuration
@EnableJpaRepositories("org.powertac.visualizer.repository")
@EnableJpaAuditing(auditorAwareRef="springSecurityAuditorAware")
@EnableTransactionManagement
public class DatabaseConfiguration
extends Object
-
Constructor Summary
Constructors Constructor Description DatabaseConfiguration(org.springframework.core.env.Environment env) -
Method Summary
Modifier and Type Method Description org.h2.tools.Serverh2TCPServer()Open the TCP port for the H2 database, so it is available remotely.com.fasterxml.jackson.datatype.hibernate5.Hibernate5Modulehibernate5Module()liquibase.integration.spring.SpringLiquibaseliquibase(org.springframework.core.task.TaskExecutor taskExecutor, DataSource dataSource, org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties liquibaseProperties)
-
Constructor Details
-
DatabaseConfiguration
public DatabaseConfiguration(org.springframework.core.env.Environment env)
-
-
Method Details
-
h2TCPServer
@Bean(initMethod="start", destroyMethod="stop") @Profile("dev") public org.h2.tools.Server h2TCPServer() throws SQLExceptionOpen the TCP port for the H2 database, so it is available remotely.- Returns:
- the H2 database TCP server
- Throws:
SQLException- if the server failed to start
-
liquibase
@Bean public liquibase.integration.spring.SpringLiquibase liquibase(@Qualifier("taskExecutor") org.springframework.core.task.TaskExecutor taskExecutor, DataSource dataSource, org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties liquibaseProperties) -
hibernate5Module
@Bean public com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module hibernate5Module()
-