1 2 3 4 5 6 7 8 9 10 11
| conf.configure("ExportSchema.cfg.xml");
conf.setProperty("hibernate.dialect", PROP.getProperty("hibernate.dialect.test"));
conf.setProperty("hibernate.connection.driver_class", PROP.getProperty("hibernate.driver.test"));
conf.setProperty("hibernate.connection.url", ((DriverManagerDataSource) dataSourceEntry.getValue()).getUrl());
conf.setProperty("hibernate.connection.username", PROP.getProperty("database.username.test"));
conf.setProperty("hibernate.connection.password", PROP.getProperty("database.password.test"));
conf.setProperty("hibernate.cache.provider_class", "net.sf.ehcache.hibernate.SingletonEhCacheProvider");
conf.setProperty("hibernate.cache.region.factory_class", "org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory");
SchemaExport schemaExport = new SchemaExport(conf);
schemaExport.execute(false, true, false, false); |
Partager