use of de.alpharogroup.springconfig.DataSourceBean in project bundle-app-ui by astrapi69.
the class PersistenceJPAConfig method dataSource.
@Bean
public DataSource dataSource() {
final JdbcUrlBean bean = JdbcUrlBean.builder().protocol("jdbc:h2:").database("file:~/bundlemanagement").parameter("MODE=PostgreSQL").parameter("DB_CLOSE_ON_EXIT=FALSE").parameter("DB_CLOSE_DELAY=-1").build();
final DataSourceBean dataSourceBean = DataSourceBean.builder().url(JdbcUrlBean.newH2JdbcUrl(bean)).driverClassName("org.h2.Driver").username("sa").password("").build();
return SpringJpaFactory.newDataSource(dataSourceBean);
}
Aggregations