mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
获取context-path优化
This commit is contained in:
@@ -108,7 +108,18 @@ ribbon.ReadTimeout: 60000
|
||||
微服务项目定义了`server.servlet.context-path=/story-service`,同时必须指定:
|
||||
|
||||
```properties
|
||||
spring.cloud.nacos.discovery.metadata.server.servlet.context-path=${server.servlet.context-path}
|
||||
spring.cloud.nacos.discovery.metadata.context-path=${server.servlet.context-path}
|
||||
```
|
||||
|
||||
yml配置如下:
|
||||
|
||||
```yaml
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
metadata:
|
||||
context-path: ${server.servlet.context-path}
|
||||
```
|
||||
|
||||
不然网关无法拉取路由信息
|
||||
|
Reference in New Issue
Block a user