团队协作之动态网关问题1

Blade 未结 2 1363
jmx
jmx 2020-08-18 20:04

一、该问题的重现步骤是什么?

  1. 团队协作之动态网关,如果直接从网关的项目接口,是没有问题的。走的是本机的服务,但是存在Feign调用的情况下,还是调不到本机的服务啊,怎么处理?

  2. 网关,desk,auth,user,system,gateway的启动类都加上了“-Chill”,然后启动了。

  3. 配置如下:

[

{

"id": "desk-route",

"order": 0,

"predicates": [

{

"name": "Path",

"args": {

"pattern": "/blade-desk/**"

}

}

],

"filters": [],

"uri": "lb://blade-desk-Chill"

},

{

"id": "auth-route",

"order": 0,

"predicates": [

{

"name": "Path",

"args": {

"pattern": "/blade-auth/**"

}

}

],

"filters": [],

"uri": "lb://blade-auth-Chill"

},

{

"id": "user-route",

"order": 0,

"predicates": [

{

"name": "Path",

"args": {

"pattern": "/blade-user/**"

}

}

],

"filters": [],

"uri": "lb://blade-user-Chill"

},

{

"id": "system-route",

"order": 0,

"predicates": [

{

"name": "Path",

"args": {

"pattern": "/blade-system/**"

}

}

],

"filters": [],

"uri": "lb://blade-system-Chill"

},

{

"id": "example-route",

"order": 0,

"predicates": [{

"name": "Path",

"args": {

"pattern": "/example"

}

}],

"filters": [],

"uri": "http://www.example.com"

}

]


2条回答
  •  jmx
    jmx (楼主)
    2020-08-19 15:15

    那我服务之间调用Feign 也不走gateway啊


    作者追问:2020-08-19 15:15

    feign的地址配置了服务名,当然会走gateway

提交回复