web-gateway.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ##如果有配置服务的话,远程服务器和本地服务器配置不一致的情况下,优先远程的为主
  2. server:
  3. port: ${server.web-gateway-port}
  4. context-path: ${server.context-path.svr-web-gateway-context-path}
  5. #zuul 默认会代理所有的微服务 路径 /{appliction.name}/**
  6. #zuul:
  7. # ignored-services: '*' ##忽略全部的代理 忽略单个微服务 ignored-services: svr-user 多个逗号分割
  8. # routes:
  9. # svr-user: /user/** ##svr-user方向代理到/user下多层级的路径
  10. # svr-user: 这种方式和 svr-user: /user/** 一样 svr-user可以随便写 唯一即可
  11. # path: /user/** path是代理后的路径
  12. # serviceId: svr-user serviceId是微服务name
  13. # svr-user: 这种方式和 上面一样 就是serviceId改成具体的url 但是这种配置方法不能利用eurika的负载均衡
  14. # path: /user/**
  15. # url: http://localhost:10020/
  16. #svr-user: 这边是微服务ID 配置负载均衡
  17. # ribbon:
  18. # listOfService: http://localhost:10020/,http://localhost:10021/
  19. yihu:
  20. admin:
  21. client:
  22. advice:
  23. sql: false
  24. ---
  25. spring:
  26. profiles: jwdev
  27. zipkin:
  28. base-url: http://localhost:${server.svr-logServer-port} #日志追踪的地址必须 http://开头 不然会报错
  29. sleuth:
  30. sampler:
  31. percentage: 1.0 ##采用需要的请求的百分比 默认是0.1 即 10%
  32. yihu:
  33. admin:
  34. client:
  35. server:
  36. ip: 192.168.131.102
  37. port: 8082
  38. ---
  39. spring:
  40. profiles: jwtest
  41. zipkin:
  42. base-url: http://localhost:${server.svr-logServer-port} #日志追踪的地址
  43. sleuth:
  44. sampler:
  45. percentage: 1.0 ##采用需要的请求的百分比 默认是0.1 即 10%
  46. yihu:
  47. admin:
  48. client:
  49. server:
  50. ip: 192.168.131.102
  51. port: 8082
  52. ---
  53. spring:
  54. profiles: jwprod
  55. zipkin:
  56. base-url: http://localhost:${server.svr-logServer-port} #日志追踪的地址
  57. sleuth:
  58. sampler:
  59. percentage: 1.0 ##采用需要的请求的百分比 默认是0.1 即 10%
  60. yihu:
  61. admin:
  62. client:
  63. server:
  64. ip: 192.168.131.102
  65. port: 8082