CampusCloudIntelligence-App.../Gateway_Server-dev.yml
2023-11-21 13:27:15 +08:00

21 lines
712 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server:
port: 8500
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka
spring:
application:
name: gateway
cloud:
gateway:
# 配置路由,注意这里是个列表,每一项都包含了很多信息
routes:
- id: Terminal_Service # 路由名称
uri: lb://Terminal_Service # 路由的地址lb表示使用负载均衡到微服务也可以使用http正常转发
predicates: # 路由规则,断言什么请求会被路由
- Path=/connect/** # 只要是访问的这个路径,一律都被路由到上面指定的服务
- id: User_Service
uri: lb://User_Service
predicates:
- Path=/user/**