@Test public void ds0() { this.contextRunner.withUserConfiguration(GkDatasourceAutoConfiguration.class).run(context -> { assertThat(context).doesNotHaveBean("ds0"); }); }
@Bean public HikariDataSource ds0(GkDatasourceProperties properties) { HikariDataSource dataSource = new HikariDataSource(); dataSource.setUsername(properties.getDs0().getUsername()); dataSource.setDriverClassName(properties.getDs0().getDriverClassName()); dataSource.setJdbcUrl(properties.getDs0().getJdbcUrl()); dataSource.setPassword(properties.getDs0().getPassword()); return dataSource; }
GkDatasourceAutoConfiguration { @Bean public HikariDataSource ds0(GkDatasourceProperties properties) { HikariDataSource dataSource = new HikariDataSource(); dataSource.setUsername(properties.getDs0().getUsername()); dataSource.setDriverClassName(properties.getDs0().getDriverClassName()); dataSource.setJdbcUrl(properties.getDs0().getJdbcUrl()); dataSource.setPassword(properties.getDs0().getPassword()); return dataSource; } }
GkDatasourceAutoConfiguration { @Bean public HikariDataSource ds0(GkDatasourceProperties properties) { HikariDataSource dataSource = new HikariDataSource(); dataSource.setUsername(properties.getDs0().getUsername()); dataSource.setDriverClassName(properties.getDs0().getDriverClassName()); dataSource.setJdbcUrl(properties.getDs0().getJdbcUrl()); dataSource.setPassword(properties.getDs0().getPassword()); return dataSource; }  }
GkDatasourceAutoConfiguration { @Bean public HikariDataSource ds0(GkDatasourceProperties properties) { HikariDataSource dataSource = new HikariDataSource(); dataSource.setUsername(properties.getDs0().getUsername()); dataSource.setDriverClassName(properties.getDs0().getDriverClassName()); dataSource.setJdbcUrl(properties.getDs0().getJdbcUrl()); dataSource.setPassword(properties.getDs0().getPassword()); return dataSource; }  @Bean HikariDataSource ds0(GkDatasourceProperties properties); @Bean HikariDataSource ds1(GkDatasourceProperties properties); }
GkDatasourceAutoConfiguration { @Bean public HikariDataSource ds0(GkDatasourceProperties properties) { HikariDataSource dataSource = new HikariDataSource(); dataSource.setUsername(properties.getDs0().getUsername()); dataSource.setDriverClassName(properties.getDs0().getDriverClassName()); dataSource.setJdbcUrl(properties.getDs0().getJdbcUrl()); dataSource.setPassword(properties.getDs0().getPassword()); return dataSource; }  @Bean HikariDataSource ds0(GkDatasourceProperties properties); @Bean HikariDataSource ds1(GkDatasourceProperties properties);  }