mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
split the getter/setter for selector
Some old versions of Spring Framework would check the getter/setter of a bean property. While they were not the same type, exception would be thrown. So selector’s getter&setter are all String now.
This commit is contained in:
@@ -145,12 +145,20 @@ public class HighAvailableDataSource extends WrapperAdapter implements DataSourc
|
||||
}
|
||||
DataSourceSelector selector = DataSourceSelectorFactory.getSelector(name, this);
|
||||
if (selector != null) {
|
||||
this.selector = selector;
|
||||
setDataSourceSelector(selector);
|
||||
}
|
||||
}
|
||||
|
||||
public DataSourceSelector getSelector() {
|
||||
return selector;
|
||||
public String getSelector() {
|
||||
return selector == null ? null : selector.getName();
|
||||
}
|
||||
|
||||
public DataSourceSelector getDataSourceSelector() {
|
||||
return this.selector;
|
||||
}
|
||||
|
||||
public void setDataSourceSelector(DataSourceSelector dataSourceSelector) {
|
||||
this.selector = dataSourceSelector;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user