spring: application: name: Gateway zipkin: base-url: http://10.10.8.2:9050 server: port: 9030 eureka: instance: prefer-ip-address: true #使用IP注册 instance-id: ${spring.cloud.client.ipAddress}:${server.port} client: service-url: defaultZone: http://register1:9010/eureka/,http://register2:9011/eureka/ ###actuator监控点 start#### endpoints: health: sensitive: false enabled: true ##默认情况下很多端点是不允许访问的,会返回401:Unauthorized management: security: enabled: false ###actuator监控点 end#### ###如下Oauth2.0配置参考## ###https://stackoverflow.com/questions/30327269/spring-oauth-authorization-server-behind-spring-cloud-zuul-proxy## ###https://github.com/spring-guides/tut-spring-security-and-angular-js/blob/master/oauth2-vanilla/README.adoc## ###http://wiselyman.iteye.com/blog/2379419## ####### zuul: host: connect-timeout-millis: 10000 socket-timeout-millis: 60000 routes: uaa: path: /uaa/** strip-prefix: true sensitiveHeaders: serviceId: auth2.0-center security: basic: enabled: false oauth2: client: access-token-uri: http://10.10.8.2:9030/uaa/oauth/token ##网关的地址 user-authorization-uri: http://10.10.8.2:9030/uaa/oauth/authorize resource: user-info-uri: http://10.10.8.2:9030/uaa/user prefer-token-info: false ##############end##################### ####超时配置#### ribbon: ReadTimeout: 10000 ConnectTimeout: 10000 MaxAutoRetries: 1 MaxAutoRetriesNextServer: 2 eureka: enabled: true hystrix: command: default: execution: timeout: enabled: true isolation: thread: timeoutInMilliseconds: 600000 ###超时配置###