gmetry-gateway.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. spring:
  2. cloud:
  3. gateway:
  4. globalcors:
  5. cors-configurations:
  6. '[/**]':
  7. allowedOriginPatterns: "*"
  8. allowedMethods: "*"
  9. allowedHeaders: "*"
  10. allowCredentials: true
  11. add-to-simple-url-handler-mapping: true
  12. default-filters:
  13. - DedupeResponseHeader=Access-Control-Allow-Origin Access-Control-Allow-Credentials
  14. discovery:
  15. locator:
  16. lowerCaseServiceId: true
  17. enabled: true
  18. routes:
  19. # 系统模块
  20. - id: gmetry-system
  21. uri: lb://gmetry-system
  22. predicates:
  23. - Path=/api/**
  24. filters:
  25. # JWT header处理
  26. - JwtHeaderFilter
  27. - StripPrefix=1
  28. # BI模块
  29. - id: gmetry-bi
  30. uri: lb://gmetry-bi
  31. predicates:
  32. - Path=/bi-api/**
  33. filters:
  34. - StripPrefix=1
  35. # MCP模块
  36. - id: gmetry-mcp
  37. uri: lb://gmetry-mcp
  38. predicates:
  39. - Path=/mcp-api/**
  40. filters:
  41. - StripPrefix=1
  42. # USERPROFILE模块
  43. - id: gmetry-userprofile
  44. uri: lb://gmetry-userprofile
  45. predicates:
  46. - Path=/userprofile-api/**
  47. filters:
  48. - StripPrefix=1
  49. # DEPLOYMENT模块
  50. - id: gmetry-deployment
  51. uri: lb://gmetry-deployment
  52. predicates:
  53. - Path=/upgrade-api/**
  54. filters:
  55. - StripPrefix=1
  56. #spring boot actuator端点启用和暴露
  57. management:
  58. endpoint:
  59. health:
  60. show-details: always
  61. endpoints:
  62. web:
  63. exposure:
  64. exclude: shutdown, beans #此处控制的是不开放哪些端点
  65. include: "*" #此处控制的是开放哪些端点,如果需要开启少数端点可以这样配置:health,info。如果开启多个则使用*号开启除了exclude的端点
  66. metrics:
  67. export:
  68. prometheus:
  69. enable: true