application.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ##如果有配置服务的话,远程服务器和本地服务器配置不一致的情况下,优先远程的为主
  2. spring:
  3. application:
  4. name: manage-gateway ##注册到发现服务的id 如果id一样 eurika会自动做负载
  5. ##开启feign断路器
  6. feign:
  7. hystrix:
  8. enabled: true
  9. management:
  10. security:
  11. enabled: false ##关闭 refresh的权限认证
  12. #zuul 默认会代理所有的微服务 路径 /{appliction.name}/**
  13. zuul:
  14. ignored-services: '*' ##忽略全部的代理 忽略单个微服务 ignored-services: svr-base 多个逗号分割
  15. routes:
  16. svr-base: /base/** ##svr-base方向代理到/base下多层级的路径
  17. # svr-base: 这种方式和 svr-base: /base/** 一样 svr-base可以随便写 唯一即可
  18. # path: /base/** path是代理后的路径
  19. # serviceId: svr-base serviceId是微服务name
  20. # svr-base: 这种方式和 上面一样 就是serviceId改成具体的url 但是这种配置方法不能利用eurika的负载均衡
  21. # path: /base/**
  22. # url: http://localhost:10020/
  23. #svr-base: 这边是微服务ID 配置负载均衡
  24. # ribbon:
  25. # listOfService: http://localhost:10020/,http://localhost:10021/
  26. ---
  27. spring:
  28. profiles: jwdev
  29. # cloud:
  30. # stream:
  31. # kafka:
  32. # binder:
  33. # brokers: 172.17.110.201
  34. # defaultBrokerPort: 9092
  35. # zkNodes: 172.17.110.201
  36. # defaultZkPort: 2181
  37. # replicationFactor: 1
  38. ---
  39. spring:
  40. profiles: jwtest
  41. ---
  42. spring:
  43. profiles: jwprod