fix: fixed no gateway group problem

This commit is contained in:
Francis Dong
2020-10-27 12:01:46 +08:00
parent d289111ecc
commit 3136f60d94

View File

@@ -83,11 +83,14 @@ public class StatPluginFilter extends PluginFilter {
@PostConstruct
public void init() {
Iterator<String> it = gatewayGroupService.currentGatewayGroupSet.iterator();
currentGatewayGroups = it.next();
while (it.hasNext()) {
if(StringUtils.isBlank(currentGatewayGroups)) {
currentGatewayGroups = it.next();
}else {
currentGatewayGroups = currentGatewayGroups + ',' + it.next();
}
}
}
@Override
public Mono<Void> doFilter(ServerWebExchange exchange, Map<String, Object> config, String fixedConfig) {