12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- spring:
- cloud:
- gateway:
- globalcors:
- cors-configurations:
- '[/**]':
- allowedOriginPatterns: "*"
- allowedMethods: "*"
- allowedHeaders: "*"
- allowCredentials: true
- add-to-simple-url-handler-mapping: true
- default-filters:
- - DedupeResponseHeader=Access-Control-Allow-Origin Access-Control-Allow-Credentials
- discovery:
- locator:
- lowerCaseServiceId: true
- enabled: true
- routes:
- # 系统模块
- - id: gmetry-system
- uri: lb://gmetry-system
- predicates:
- - Path=/api/**
- filters:
- # JWT header处理
- - JwtHeaderFilter
- - StripPrefix=1
- # BI模块
- - id: gmetry-bi
- uri: lb://gmetry-bi
- predicates:
- - Path=/bi-api/**
- filters:
- - StripPrefix=1
- # MCP模块
- - id: gmetry-mcp
- uri: lb://gmetry-mcp
- predicates:
- - Path=/mcp-api/**
- filters:
- - StripPrefix=1
- # USERPROFILE模块
- - id: gmetry-userprofile
- uri: lb://gmetry-userprofile
- predicates:
- - Path=/userprofile-api/**
- filters:
- - StripPrefix=1
- # DEPLOYMENT模块
- - id: gmetry-deployment
- uri: lb://gmetry-deployment
- predicates:
- - Path=/upgrade-api/**
- filters:
- - StripPrefix=1
- #spring boot actuator端点启用和暴露
- management:
- endpoint:
- health:
- show-details: always
- endpoints:
- web:
- exposure:
- exclude: shutdown, beans #此处控制的是不开放哪些端点
- include: "*" #此处控制的是开放哪些端点,如果需要开启少数端点可以这样配置:health,info。如果开启多个则使用*号开启除了exclude的端点
- metrics:
- export:
- prometheus:
- enable: true
|