由于 Spring Cloud 团队已经放弃了 Zuul 模块的开发,我们正在转向 Spring Cloud Gateway 或 Zuul2,但我相信 Zuul2 需要在架构上进行大量更改,并且需要在微服务中进行较大更改(如果我错了,请纠正我),可以任何人都在 zuul2 或 Spring-Cloud-Gateway 上给出了推荐,有没有人或您知道使用 Spring-Cloud-Gateway 的技术领域的任何大玩家?
我还是Clojure的新人; 我正在尝试拆分从CSV文件解析的值,但不使用clojure.string/splitlib或任何其他lib clojure.core,请提前帮助,请提前帮助.
我在下面的代码中有一个嵌套循环,我正在尝试优化,因为我知道嵌套for循环是非常昂贵的,任何人都有不同的方法来实现这一点?
提前致谢!
private List<Map<String, Object>> updateSomething(List<Map<String, Object>> list)
throws MetadataException {
for (Map<String, Object> map : list) {
setFilePathAndOffsetParams(map);
for (Map.Entry<String, String> entry : anotherMap.entrySet()) {
updateKeyOnMap(map, entry.getKey(), entry.getValue());
}
}
return list;
}
private void updateKeyOnMap(Map<String, Object> map, String newKey, String oldKey) {
if (!newKey.equals(oldKey)) {
map.put(newKey, map.get(oldKey));
map.remove(oldKey);
}
Run Code Online (Sandbox Code Playgroud)