@ Subscribe @ SneakyThrows public final synchronized void renew ( final DataSourceChangedEvent dataSourceChangedEvent ) { dataSource . close ( ) ; dataSource = new MasterSlaveDataSource ( DataSourceConverter . getDataSourceMap ( dataSourceChangedEvent . getDataSourceConfigurations ( ) ) , dataSource . getMasterSlaveRule ( ) , dataSource . getShardingProperties ( ) . getProps ( ) ) ; }
Renew master - slave data source .