use of com.evolveum.midpoint.repo.sql.testing.TestSqlRepositoryFactory in project midpoint by Evolveum.
the class DataSourceTestBeanPostprocessor method postProcessAfterInitialization.
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (!(bean instanceof RepositoryFactory)) {
return bean;
}
TestSqlRepositoryFactory factory = context.getBean("testSqlRepositoryFactory", TestSqlRepositoryFactory.class);
SqlRepositoryConfiguration config = factory.getSqlConfiguration();
if (!config.isUsingH2()) {
return bean;
}
System.out.println("Changing hibernate.hbm2ddl.auto to update");
LOGGER.info("Changing hibernate.hbm2ddl.auto to update");
config.setHibernateHbm2ddl("update");
return bean;
}
Aggregations