use of org.springframework.jdbc.datasource.DriverManagerDataSource in project vertx-examples by vert-x3.
the class ExampleSpringConfiguration method dataSource.
@Bean
@Autowired
public DataSource dataSource(DatabasePopulator populator) {
final DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(env.getProperty("jdbc.driverClassName"));
dataSource.setUrl(env.getProperty("jdbc.url"));
dataSource.setUsername(env.getProperty("jdbc.username"));
dataSource.setPassword(env.getProperty("jdbc.password"));
DatabasePopulatorUtils.execute(populator, dataSource);
return dataSource;
}
use of org.springframework.jdbc.datasource.DriverManagerDataSource in project ff4j by ff4j.
the class SpringJdbcPropertyStoreTestDocker method getDataSource.
public DataSource getDataSource() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName("org.postgresql.Driver");
dataSource.setUrl(postgresContainer.getJdbcUrl());
dataSource.setUsername(postgresContainer.getUsername());
dataSource.setPassword(postgresContainer.getPassword());
return dataSource;
}
Aggregations