博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Configuring Route Predicate Factories and Gateway Filter Factories
阅读量:2156 次
发布时间:2019-05-01

本文共 1007 字,大约阅读时间需要 3 分钟。

 

Shortcut configuration is recognized by the filter name, followed by an equals sign (=), followed by argument values separated by commas (,).

application.yml

 

spring:  cloud:    gateway:      routes:      - id: after_route        uri: https://example.org        predicates:        - Cookie=mycookie,mycookievalue

The previous sample defines the Cookie Route Predicate Factory with two arguments, the cookie name, mycookie and the value to match mycookievalue.

 

 

Fully expanded arguments appear more like standard yaml configuration with name/value pairs. Typically, there will be a namekey and an args key. The args key is a map of key value pairs to configure the predicate or filter.

application.yml

spring:  cloud:    gateway:      routes:      - id: after_route        uri: https://example.org        predicates:        - name: Cookie          args:            name: mycookie            regexp: mycookievalue

This is the full configuration of the shortcut configuration of the Cookie predicate shown above.

 

 

转载地址:http://hkawb.baihongyu.com/

你可能感兴趣的文章
【LEETCODE】102-Binary Tree Level Order Traversal
查看>>
【LEETCODE】106-Construct Binary Tree from Inorder and Postorder Traversal
查看>>
【LEETCODE】202-Happy Number
查看>>
和机器学习和计算机视觉相关的数学
查看>>
十个值得一试的开源深度学习框架
查看>>
【LEETCODE】240-Search a 2D Matrix II
查看>>
【LEETCODE】53-Maximum Subarray
查看>>
【LEETCODE】215-Kth Largest Element in an Array
查看>>
【LEETCODE】241-Different Ways to Add Parentheses
查看>>
【LEETCODE】312-Burst Balloons
查看>>
【LEETCODE】232-Implement Queue using Stacks
查看>>
【LEETCODE】225-Implement Stack using Queues
查看>>
【LEETCODE】155-Min Stack
查看>>
【LEETCODE】20-Valid Parentheses
查看>>
【LEETCODE】290-Word Pattern
查看>>
【LEETCODE】36-Valid Sudoku
查看>>
【LEETCODE】205-Isomorphic Strings
查看>>
【LEETCODE】204-Count Primes
查看>>
【LEETCODE】228-Summary Ranges
查看>>
【LEETCODE】27-Remove Element
查看>>