Package org.springframework.jdbc.datasource.embedded

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


    return transactionManager;
  }

  @Bean
  public DataSource datasource() {
    EmbeddedDatabaseFactoryBean bean = new EmbeddedDatabaseFactoryBean();
    ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator();
    databasePopulator.addScript(new ClassPathResource("hibernate/config/java/schema.sql"));
    bean.setDatabasePopulator(databasePopulator);
    bean.afterPropertiesSet(); // necessary because
                  // EmbeddedDatabaseFactoryBean is a
                  // FactoryBean
    return bean.getObject();
  }
View Full Code Here


        return new HibernateTransactionManager(sessionFactory());
    }
 
  @Bean
  public DataSource datasource() {
    EmbeddedDatabaseFactoryBean bean = new EmbeddedDatabaseFactoryBean();
    ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator();
    databasePopulator.addScript(new ClassPathResource("hibernate/config/java/schema.sql"));
    bean.setDatabasePopulator(databasePopulator);
    bean.afterPropertiesSet(); // necessary because EmbeddedDatabaseFactoryBean is a FactoryBean
    return bean.getObject();
  }
View Full Code Here

TOP

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

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.