当前位置:网站首页>Mapping rule configuration of zuul route
Mapping rule configuration of zuul route
2022-07-19 06:59:00 【He is a rookie programmer】
The general writing is like this 
Its function is to conform to /eureka-consumer/** The request path of the rule is forwarded to the eureka-consumer On the service instance of , among routers( Refer to eureka-consumer,) Can be specified as any route name ( for example eureka-consumer2), but serviceId Must be Eureka Service instance of the service registry
In this way of writing , You can go through eureka-consumer1 To visit , perhaps eureka-consumer


But here's the thing , By default ,Zuul Automatically for Eureka Create mapping relationships for all service instances in the service registry , in other words , It can also be done through eureka-provider To visit , It's just the different port numbers
Such as this 
If you don't want to use the default routing rules , You can add the following contents to the configuration file , You can close all default configuration rules
zuul:
routes:
ignored-services: '*'
Turn off all default routing mapping configuration rules , This can only be based on path Access the path inside
eureka-provider No way , Only through eureka-consumer1 This path 

Actually , There is another simpler way to configure gateway routing , Namely zuul.routes.serviceId( Specify the specific service name of the route )=path( Configure the matching request mapping address )
zuul:
routes:
eureka-consumer:
path: /eureka-consumer1/**
边栏推荐
- Galaxy Kirin server system building local and LAN Yum source
- STEAM游戏高主频i9-12900k 搭建CS:GO服务器
- Xiaodi network security - Notes (3)
- 文本三剑客之sed命令--文本替换;grep命令---文本过滤
- How to determine the electronic gear ratio of servo motor?
- F5ltm (I) logic diagram
- Xiaodi network security - Notes (4)
- 传奇游戏架设教程
- Generate audio and waveform in PWM and DAC exercises of stm32
- Double code time scale network diagram
猜你喜欢

How to determine the electronic gear ratio of servo motor?

Comparison of advantages and disadvantages between SD NAND and EMMC

高并发day01(NIO、ConCurrent包)
![[jmeter] TCP Sampler](/img/ac/3b08db8808d84eb144262d78880050.png)
[jmeter] TCP Sampler

【自动化测试】——robotframework实战(一)搭建环境

传奇手游怎么开服?需要投资多少?需要那些东西?

Slag learning road (2) pure white direction: win Server 2003 server building

企业或个人域名备案怎么弄

Tcp/ip protocol learning

我的世界1.12.2 神奇宝贝(精灵宝可梦) 开服教程
随机推荐
5G时代服务器在这里面起着什么作用?
Double code time scale network diagram
快速掌握sort命令,tr命令
高并发day01(NIO、ConCurrent包)
传奇怎么开服?开传奇私服需要准备什么呢?
telnet安装
Xiaodi network security - note encryption coding algorithm (6)
通过数据加密方案阻止勒索攻击
Galaxy Kirin server system building local and LAN Yum source
SSH remote login service
Évaluation des performances de la machine virtuelle Tianyi Cloud Hangzhou (VPS)
银河麒麟服务器系统搭建本地和局域网yum源
网站被劫持了怎么办?
1.服务器是什么?
文本三剑客之awk命令--截取
F5ltm (I) logic diagram
促进数字世界的信任
配置树莓派3b+搭建个人网站
毛毛上班(递推)
小迪网络安全-笔记(5)