application.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. server:
  2. port: 8000
  3. tomcat:
  4. accesslog:
  5. enabled: true
  6. buffered: true
  7. directory: /var/logs
  8. file-date-format: -yyyy-MM-dd
  9. pattern: common
  10. prefix: tomcat-gateway
  11. rename-on-rotate: false
  12. request-attributes-enabled: false
  13. rotate: true
  14. suffix: .log
  15. spring:
  16. application:
  17. name: gateway-web
  18. servlet:
  19. multipart:
  20. # 最大支持文件大小
  21. max-file-size: 50MB
  22. # 最大支持请求大小
  23. max-request-size: 50MB
  24. eureka:
  25. client:
  26. serviceUrl:
  27. defaultZone: http://admin:admin123@localhost:8761/eureka/eureka/
  28. instance:
  29. lease-renewal-interval-in-seconds: 5
  30. ribbon:
  31. eureka:
  32. enable: true
  33. ReadTimeout: 30000
  34. ConnectTimeout: 10000
  35. ### 配置网关反向代理
  36. zuul:
  37. routes:
  38. api-auth:
  39. ### 以 /api-auth/访问转发到会员服务
  40. path: /api-auth/**
  41. serviceId: auth-server
  42. #url: http://localhost:8001/
  43. ##加上下面参数,可将header信息传递至下游
  44. #sensitiveHeaders:
  45. api-task:
  46. ### 以 /api-auth/访问转发到会员服务
  47. path: /api-task/**
  48. serviceId: task-server
  49. #url: http://localhost:8001/
  50. ##加上下面参数,可将header信息传递至下游
  51. #sensitiveHeaders:
  52. api-cms:
  53. ### 以 /api-auth/访问转发到会员服务
  54. path: /api-cms/**
  55. serviceId: cms-server
  56. #url: http://localhost:8001/
  57. ##加上下面参数,可将header信息传递至下游
  58. #sensitiveHeaders:
  59. api-web:
  60. ### 以 /api-auth/访问转发到会员服务
  61. path: /api-web/**
  62. serviceId: web-server
  63. #url: http://localhost:8001/
  64. ##加上下面参数,可将header信息传递至下游
  65. #sensitiveHeaders: Cookie,Set-Cookie
  66. api-im:
  67. ### 以 /api-auth/访问转发到会员服务
  68. path: /api-im/**
  69. serviceId: im-server
  70. #url: http://localhost:8001/
  71. ##加上下面参数,可将header信息传递至下游
  72. #sensitiveHeaders:
  73. api-student:
  74. ### 以 /api-auth/访问转发到会员服务
  75. path: /api-student/**
  76. serviceId: student-server
  77. #url: http://localhost:8001/
  78. ##加上下面参数,可将header信息传递至下游
  79. #sensitiveHeaders:
  80. api-teacher:
  81. ### 以 /api-auth/访问转发到会员服务
  82. path: /api-teacher/**
  83. serviceId: teacher-server
  84. #url: http://localhost:8001/
  85. ##加上下面参数,可将header信息传递至下游
  86. #sensitiveHeaders:
  87. api-education:
  88. ### 以 /api-auth/访问转发到会员服务
  89. path: /api-education/**
  90. serviceId: education-server
  91. #url: http://localhost:8001/
  92. ##加上下面参数,可将header信息传递至下游
  93. #sensitiveHeaders:
  94. #忽略某个微服务
  95. ignored-services: eureka-server
  96. #重试
  97. retryable: false
  98. host:
  99. #连接超时
  100. connectTimeoutMillis: 600000
  101. ribbon-isolation-strategy: SEMAPHORE
  102. sensitiveHeaders:
  103. hystrix:
  104. command:
  105. default:
  106. execution:
  107. isolation:
  108. strategy: SEMAPHORE
  109. thread:
  110. #发生熔断的超时时间
  111. timeoutInMilliseconds: 90000
  112. semaphore:
  113. maxConcurrentRequests: 500
  114. #spring boot admin 相关配置
  115. management:
  116. endpoints:
  117. web:
  118. exposure:
  119. include: "*"
  120. endpoint:
  121. health:
  122. show-details: ALWAYS