Package org.springframework.jdbc.datasource.embedded

Examples of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder


    private static final Logger logger = LoggerFactory.getLogger(JpaDerbyEmbeddedConfig.class);

    @Bean
    @Override
    public DataSource dataSource() {
        EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
        return builder.setType(EmbeddedDatabaseType.DERBY).build();
    }
View Full Code Here


@EnableTransactionManagement
public class InfrastructureConfig {

  @Bean
  public DataSource dataSource() {
    return new EmbeddedDatabaseBuilder().setName("data").setType(EmbeddedDatabaseType.HSQL).build();
  }
View Full Code Here

  @EnableJpaRepositories(basePackages = "org.springframework.data.jpa.repository.sample")
  static class Config {

    @Bean
    public DataSource dataSource() {
      return new EmbeddedDatabaseBuilder().build();
    }
View Full Code Here

        beanFactory.registerSingleton("myTransactionManager", createPlatformTransactionManager(dataSource));

    }

    public DataSource createDataSource() {
        EmbeddedDatabase dataSource = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.H2).build();
        return dataSource;
    }
View Full Code Here

        return txManager;
    }

    @Bean
    public DataSource dataSource() {
        EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
        builder.setType(EmbeddedDatabaseType.H2);
        return builder.build();
    }
View Full Code Here

        return txManager;
    }

    @Bean
    public DataSource dataSource() {
        EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
        builder.setType(EmbeddedDatabaseType.H2);
        return builder.build();
    }
View Full Code Here

  @Bean(name = "dataSource")
  DataSource dataSource() {
    logger.info("Setting up database");

    EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
    EmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.HSQL).
        addScript("schema.sql").
        addScript("test-data.sql").build();

    this.db = db;
View Full Code Here

    return new DataSourceTransactionManager(dataSource());
  }

  @Bean
  public DataSource dataSource() {
    return new EmbeddedDatabaseBuilder()
      .setType(EmbeddedDatabaseType.HSQL)
      .addScript("classpath:com/bank/config/schema.sql")
      .addScript("classpath:com/bank/config/seed-data.sql")
      .build();
  }
View Full Code Here

public class TransferScript {

  public static void main(String... args)
      throws InsufficientFundsException, IOException {

    DataSource dataSource = new EmbeddedDatabaseBuilder()
        .setType(EmbeddedDatabaseType.HSQL)
        .addScript("classpath:com/bank/config/schema.sql")
        .addScript("classpath:com/bank/config/seed-data.sql").build();

    Properties props = new Properties();
View Full Code Here

  private TransferService transferService;

  @Before
  public void setUp() throws IOException {
    DataSource dataSource = new EmbeddedDatabaseBuilder()
      .setType(EmbeddedDatabaseType.HSQL)
      .addScript("classpath:com/bank/config/schema.sql")
      .addScript("classpath:com/bank/config/seed-data.sql")
      .build();
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder

Copyright © 2018 www.massapicom. 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.