@@ -23,6 +23,8 @@ public class GatewayUrlPathUtil { | |||
private static final String HHZ_ADMIN = "tuoheng-hhz-admin"; | |||
private static final String HHZ_MP = "tuoheng-hhz-mp"; | |||
/** | |||
* 获取 gateway 路由前缀,匹配url | |||
* @param clientId | |||
@@ -34,6 +36,9 @@ public class GatewayUrlPathUtil { | |||
case HHZ_ADMIN: | |||
apiPath = "/hhz/admin"; | |||
break; | |||
case HHZ_MP: | |||
apiPath = "/hhz/api"; | |||
break; | |||
} | |||
return apiPath; | |||
} |
@@ -158,6 +158,13 @@ spring: | |||
- Path=/hhz/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# hhz 小程序服务 | |||
- id: tuoheng-hhz-api | |||
uri: lb://tuoheng-hhz-api | |||
predicates: | |||
- Path=/hhz/api/** | |||
filters: | |||
- StripPrefix=2 | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 |
@@ -157,6 +157,13 @@ spring: | |||
- Path=/hhz/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# hhz 小程序服务 | |||
- id: tuoheng-hhz-api | |||
uri: lb://tuoheng-hhz-api | |||
predicates: | |||
- Path=/hhz/api/** | |||
filters: | |||
- StripPrefix=2 | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 |
@@ -150,6 +150,13 @@ spring: | |||
- Path=/hhz/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# hhz 小程序服务 | |||
- id: tuoheng-hhz-api | |||
uri: lb://tuoheng-hhz-api | |||
predicates: | |||
- Path=/hhz/api/** | |||
filters: | |||
- StripPrefix=2 | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 |
@@ -151,6 +151,13 @@ spring: | |||
- Path=/hhz/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# hhz 小程序服务 | |||
- id: tuoheng-hhz-api | |||
uri: lb://tuoheng-hhz-api | |||
predicates: | |||
- Path=/hhz/api/** | |||
filters: | |||
- StripPrefix=2 | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 |