#1999 - Additionally support "none" for read only url

"none" can then be used as a special literal value in configuration for "no read-only jdbc url"
This commit is contained in:
rob bygrave
2020-04-29 22:07:27 +12:00
parent 6f1472abe0
commit 2a03198393
2 changed files with 22 additions and 19 deletions
@@ -74,7 +74,8 @@ class InitDataSource {
// it has explicitly been set to null, not expected but ok
return null;
}
if (roConfig.getUrl() == null && !config.isAutoReadOnlyDataSource()) {
final String url = roConfig.getUrl();
if ("none".equalsIgnoreCase(url) || (url == null && !config.isAutoReadOnlyDataSource())) {
// no read-only DataSource will be used
return null;
}