Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save maciejwalkowiak/9d7a42a8eb630bf7449acf10a83a9615 to your computer and use it in GitHub Desktop.
Save maciejwalkowiak/9d7a42a8eb630bf7449acf10a83a9615 to your computer and use it in GitHub Desktop.
@Bean
SimpleDriverDataSource simpleDriverDataSource(JdbcConnectionDetails properties) {
SimpleDriverDataSource simpleDriverDataSource = new SimpleDriverDataSource();
simpleDriverDataSource.setUrl(properties.getJdbcUrl());
simpleDriverDataSource.setDriver(new org.postgresql.Driver());
simpleDriverDataSource.setUsername(properties.getUsername());
simpleDriverDataSource.setPassword(properties.getPassword());
return simpleDriverDataSource;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment