Class DatabaseConfiguration


  • @Configuration
    @EnableJpaRepositories("org.powertac.visualizer.repository")
    @EnableJpaAuditing(auditorAwareRef="springSecurityAuditorAware")
    @EnableTransactionManagement
    public class DatabaseConfiguration
    extends Object
    • Constructor Detail

      • DatabaseConfiguration

        public DatabaseConfiguration​(org.springframework.core.env.Environment env)
    • Method Detail

      • 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()