Package org.springframework.jdbc.datasource.embedded

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


    private EmbeddedDatabase db;

    @Before
    public void setUp() throws Exception {
        db = new EmbeddedDatabaseBuilder()
            .setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
       
        super.setUp();
    }
View Full Code Here


    @Bean(name="hsqlInMemory")
  public EmbeddedDatabase hsqlInMemory() {
       
        if ( this.ed == null ) {
           
            EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
           
            this.ed = builder.setType(EmbeddedDatabaseType.HSQL)
                .addScript("aclSchema.sql").build();
           
        }
       
        return this.ed;
View Full Code Here

        return new SecurityEvaluationContextExtension();
    }

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

@EnableJpaRepositories("org.springframework.security.config.annotation.issue50.repo")
@EnableTransactionManagement
public class ApplicationConfig {
    @Bean
    public DataSource dataSource() {
        EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
        return builder.setType(EmbeddedDatabaseType.HSQL).build();
    }
View Full Code Here

  @Configuration
  static class ContextConfiguration {

    @Bean
    public DataSource dataSource() {
      return new EmbeddedDatabaseBuilder()
          .setType(EmbeddedDatabaseType.HSQL)
          .addScript("org/mybatis/spring/sample/db/database-schema.sql")
          .addScript("org/mybatis/spring/sample/db/database-test-data.sql")
          .build();
    }
View Full Code Here

            return contextSource;
        }

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

@EnableJpaRepositories("org.springframework.security.samples.data")
public class DataConfiguration {

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

   
    @Bean(name="hsqlInMemory")
  public EmbeddedDatabase hsqlInMemory() {
       
        if ( this.ed == null ) {
            EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
            this.ed = builder.setType(EmbeddedDatabaseType.HSQL).build();
        }
       
        return this.ed;
       
  }
View Full Code Here

    }

    @Before
    @Override
    public void setUp() throws Exception {
        db = new EmbeddedDatabaseBuilder()
            .setType(EmbeddedDatabaseType.DERBY).addScript("sql/init.sql").build();
       
        super.setUp();
    }
View Full Code Here

    protected JndiRegistry createRegistry() throws Exception {
        JndiRegistry jndi = super.createRegistry();
       
        // START SNIPPET: e2
        // this is the database we create with some initial data for our unit test
        db = new EmbeddedDatabaseBuilder()
            .setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
        // END SNIPPET: e2
       
        jndi.bind("jdbc/myDataSource", db);
       
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.