Commit 2b9551c4 by Nepxion

修复小Bug

parent f7cdc9ab
......@@ -51,7 +51,7 @@ public class VersionDiscoveryEnabledAdapter implements DiscoveryEnabledAdapter {
Map<String, String> versionMap = JsonUtil.fromJson(versionJson, Map.class);
String versions = versionMap.get(serviceId);
if (StringUtils.isEmpty(versions)) {
if (versions == null) {
return true;
}
......
......@@ -56,7 +56,7 @@ public class VersionDiscoveryEnabledAdapter implements DiscoveryEnabledAdapter {
Map<String, String> versionMap = JsonUtil.fromJson(versionJson, Map.class);
String versions = versionMap.get(serviceId);
if (StringUtils.isEmpty(versions)) {
if (versions == null) {
return true;
}
......
......@@ -51,7 +51,7 @@ public class VersionDiscoveryEnabledAdapter implements DiscoveryEnabledAdapter {
Map<String, String> versionMap = JsonUtil.fromJson(versionJson, Map.class);
String versions = versionMap.get(serviceId);
if (StringUtils.isEmpty(versions)) {
if (versions == null) {
return true;
}
......
......@@ -56,7 +56,7 @@ public class MyDiscoveryEnabledExtension implements DiscoveryEnabledExtension {
String filterServiceId = "discovery-springcloud-example-c";
String filterToken = "123";
if (StringUtils.equals(serviceId, filterServiceId) && StringUtils.isNotEmpty(token) && token.contains(filterToken)) {
LOG.info("过滤条件:当serviceId={} && Token含有'{}'的时候,不能被Ribbon负载均衡到", filterToken);
LOG.info("过滤条件:当serviceId={} && Token含有'{}'的时候,不能被Ribbon负载均衡到", filterServiceId, filterToken);
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment