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.Server h2TCPServer()
    Open the TCP port for the H2 database, so it is available remotely.
    com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module hibernate5Module()  
    liquibase.integration.spring.SpringLiquibase liquibase​(org.springframework.core.task.TaskExecutor taskExecutor, DataSource dataSource, org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties liquibaseProperties)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • h2TCPServer

      @Bean(initMethod="start", destroyMethod="stop") @Profile("dev") public org.h2.tools.Server h2TCPServer() throws SQLException
      Open 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()