開發四年只會寫業務代碼,分布式高并發都不會還做程式員?->>>
routes:
- id: 1
uri: http://10.10.11.42:8000/module/abc,http://10.10.11.42:8001/module/abc1
predicates:
- Before=2020-01-01T00:00:00+08:00[Asia/Shanghai]
- Path=/module/abc
類似于這樣的一個路由, URI有多個實體的話, 這地兒怎么給它配置多個IP? 試了試上面的這種配置, 路由的時候只會路由第一個IP, 原始碼里發現只會取第一個, 咋玩?
public RouteDefinition(String text) {
int eqIdx = text.indexOf(61);
if (eqIdx <= 0) {
throw new ValidationException("Unable to parse RouteDefinition text '" + text + "', must be of the form name=value");
} else {
this.setId(text.substring(0, eqIdx));
String[] args = StringUtils.tokenizeToStringArray(text.substring(eqIdx + 1), ",");
this.setUri(URI.create(args[0]));
for(int i = 1; i < args.length; ++i) {
this.predicates.add(new PredicateDefinition(args[i]));
}
}
}
uj5u.com熱心網友回復:
有解決方案了嗎?轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/14872.html
標籤:其他技術討論專區
