当前位置:网站首页>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/**
边栏推荐
- 数据保护/磁盘列阵RAID保护 IP段103.103.188.xxx
- 【自动化测试】——robotframework实战(一)搭建环境
- 银河麒麟桌面操作系统V10SP1(X86)安装SQL Developer
- IP fragment是什么意思?如何防御IP fragment攻击?
- 中国知网论文free下载的方法
- Slag learning road (2) pure white direction: win Server 2003 server building
- [automated testing] - robotframework practice (III) writing test cases
- Text three swordsman's awk command -- interception
- 配置树莓派3b+搭建个人网站
- Redraiment的遭遇
猜你喜欢

5G时代服务器在这里面起着什么作用?

小迪网络安全-笔记(4)

Common user password encryption methods and cracking methods

F5 GTM (I): DNS parameters
![[automated testing] - robotframework practice (II) new test cases](/img/e8/b5e945400445c66e3a7a129744c21d.png)
[automated testing] - robotframework practice (II) new test cases

华为云 鲲鹏ARM云服务器 和 x86云服务器 性能评测对比

Performance evaluation and comparison of Huawei cloud Kunpeng arm ECs and x86 ECS

How to determine the electronic gear ratio of servo motor?

我的世界1.12.2 神奇宝贝(精灵宝可梦) 开服教程

Minecraft bedrock BDS service tutorial
随机推荐
tail -f暂停方法
University
telnet安装
各大云服务厂商 轻量应用服务器 性能评测对比,阿里云、腾讯云、华为云、Ucloud
Slag learning path (1) output the calendar page of a certain month of a certain year
Text three swordsman's awk command -- interception
管理员阻止运行此应用
UCloud(优刻得) 上海 ARM 云服务器评测
Xiaodi network security - note encryption coding algorithm (6)
CDN是什么?使用CDN有什么优势?
【自动化测试】——robotframework实战(一)搭建环境
ANAME
day01(Flume)
内网穿透服务器搭建教程,NPS使用教程
Alien Slackware
Application case of CS brand sdnand in color detector industry
Relevant knowledge points of Gugao motion control card
F5ltm (I) logic diagram
小迪网络安全-笔记(2)
Manual string comparison (pointer question)