This commit is contained in:
tanghc
2019-09-04 08:56:44 +08:00
parent bdb4446758
commit 4cbb92cf27

View File

@@ -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="));