Package org.springframework.jdbc.datasource.embedded

Examples of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactoryBean.afterPropertiesSet()


  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


  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
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.