in appactive-java-client/client-bridge/client-bridge-db-mysql/src/main/java/io/appactive/db/mysql/utils/DataScopeUtil.java [46:69]
private static DataScope initDataScope(String instanceId, String dbName, String portName,
Map<String, String> connPropMap) {
instanceId = instanceId.toLowerCase();
dbName = dbName.toLowerCase();
portName = portName.toLowerCase();
if (connPropMap.containsKey(instanceId) && connPropMap.containsKey(dbName)) {
String instanceValue = connPropMap.get(instanceId);
String dbValue = connPropMap.get(dbName);
String portValue = connPropMap.get(portName);
if (StringUtils.isBlank(instanceValue)) {
return null;
}
if (StringUtils.isBlank(dbValue)) {
return null;
}
if (StringUtils.isBlank(portValue)){
return new DataScope(instanceValue.toLowerCase(), dbValue.toLowerCase(), null);
}
// 默认实例名称和库名称大小写不敏感
return new DataScope(instanceValue.toLowerCase(), dbValue.toLowerCase(), portValue.toLowerCase());
}
return null;
}