12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- ##如果有配置服务的话,远程服务器和本地服务器配置不一致的情况下,优先远程的为主
- spring:
- application:
- name: web-gateway #注册到发现服务的id 如果id一样 eurika会自动做负载
- http:
- multipart:
- enabled: true
- max-file-size: 500MB
- max-request-size: 500MB
- ##开启feign断路器
- feign:
- hystrix:
- enabled: true
- management:
- security:
- enabled: false #关闭 refresh的权限认证
- hystrix:
- threadpool:
- default:
- coreSize: 500 #并发执行的最大线程数,默认10
- command:
- paas-file:
- execution:
- isolation:
- thread:
- timeoutInMilliseconds: 3600000
- default:
- execution:
- isolation:
- thread:
- timeoutInMilliseconds: 8000 #命令执行超时时间,默认1000ms
- #zuul 默认会代理所有的微服务 路径 /{appliction.name}/**
- #zuul:
- # ignored-services: '*' ##忽略全部的代理 忽略单个微服务 ignored-services: svr-base 多个逗号分割
- # routes:
- # svr-base: /v1/base/** ##svr-base方向代理到/base下多层级的路径
- # svr-wlyy: /v1/wlyy/**
- # api-esb-url:
- # path: /job/**
- # url: http://192.168.131.131:10030/
- # stripPrefix: false ##如果是物理服务器要设置成false
- # svr-base: 这种方式和 svr-base: /base/** 一样 svr-base可以随便写 唯一即可
- # path: /base/** path是代理后的路径
- # serviceId: svr-base serviceId是微服务name
- # svr-base: 这种方式和 上面一样 就是serviceId改成具体的url 但是这种配置方法不能利用eurika的负载均衡
- # path: /base/**
- # url: http://localhost:10020/
- #svr-base: 这边是微服务ID 配置负载均衡
- # ribbon:
- # listOfService: http://localhost:10020/,http://localhost:10021/
- ---
- spring:
- profiles: jwdev
- # cloud:
- # stream:
- # kafka:
- # binder:
- # brokers: 172.17.110.201
- # defaultBrokerPort: 9092
- # zkNodes: 172.17.110.201
- # defaultZkPort: 2181
- # replicationFactor: 1
- ---
- spring:
- profiles: jwtest
- ---
- spring:
- profiles: jwprod
|