pull/1/head
tanghc 5 years ago
parent bdb4446758
commit 4cbb92cf27
  1. 5
      sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteCache.java

@ -47,7 +47,10 @@ public class GatewayRouteCache extends BaseRouteCache<GatewayTargetRoute> {
return predicateDefinition;
})
.collect(Collectors.toCollection(LinkedList::new));
// 添加下面两个自定义的断言到顶部
// 下面两个自定义的断言添加到顶部,注意:ReadBody需要放在最前面
// 对应断言:
// NameVersion -> com.gitee.sop.gatewaycommon.gateway.route.NameVersionRoutePredicateFactory
// ReadBody -> com.gitee.sop.gatewaycommon.gateway.route.ReadBodyRoutePredicateFactory
predicateDefinitionList.addFirst(new PredicateDefinition("NameVersion=" + routeDefinition.getId()));
predicateDefinitionList.addFirst(new PredicateDefinition("ReadBody="));

Loading…
Cancel
Save