Package com.nurkiewicz.jdbcrepository.hsqldb

Source Code of com.nurkiewicz.jdbcrepository.hsqldb.JdbcRepositoryTestHsqldbConfig

package com.nurkiewicz.jdbcrepository.hsqldb;

import com.nurkiewicz.jdbcrepository.JdbcRepositoryTestConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.sql.DataSource;

@EnableTransactionManagement
@Configuration
public class JdbcRepositoryTestHsqldbConfig extends JdbcRepositoryTestConfig {

  @Bean
  @Override
  public DataSource dataSource() {
    return new EmbeddedDatabaseBuilder().
        addScript("schema_hsqldb.sql").
        setType(EmbeddedDatabaseType.H2).
        build();
  }

}
TOP

Related Classes of com.nurkiewicz.jdbcrepository.hsqldb.JdbcRepositoryTestHsqldbConfig

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.