From 5f4ad5990fa1036e65cdba1c6429e2e54f3029d9 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 13 Aug 2015 12:16:37 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud.html | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/spring-cloud.html b/spring-cloud.html index 8ebcdd3..e3fa027 100644 --- a/spring-cloud.html +++ b/spring-cloud.html @@ -463,6 +463,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • Config First Bootstrap
  • Eureka First Bootstrap
  • Config Client Fail Fast
  • +
  • Config Client Retry
  • Locating Remote Configuration Resources
  • Security
  • @@ -753,8 +754,8 @@ things with their parent.

    Changing the Location of Bootstrap Properties

    -

    The bootstrap.yml (or .properties) location can be specified using -spring.cloud.bootstrap.name (default "bootstrap") or +

    The bootstrap.yml (or .properties) location can be specified using +`spring.cloud.bootstrap.name (default "bootstrap") or spring.cloud.bootstrap.location (default empty), e.g. in System properties. Those properties behave like the spring.config.* variants with the same name, in fact they are used to set up the @@ -1887,6 +1888,32 @@ an Exception.

    +

    Config Client Retry

    +
    +

    If you expect that the config server may occasionally be unavailable when +your app starts, you can ask it to keep trying after a failure. First you need +to set spring.cloud.config.failFast=true, and then you need to add +spring-retry and spring-boot-starter-aop to your classpath. The default +behaviour is to retry 6 times with an initial backoff interval of 1000ms and an +exponential multiplier of 1.1 for subsequent backoffs. You can configure these +properties (and others) using spring.config.retry.* configuration properties.

    +
    +
    + + + + + +
    +
    Tip
    +
    +To take full control of the retry add a @Bean of type +RetryOperationsInterceptor with id "configServerRetryInterceptor". Spring +Retry has a RetryInterceptorBuilder that makes it easy to create one. +
    +
    +
    +

    Locating Remote Configuration Resources

    The Config Service serves property sources from /{name}/{profile}/{label}, where the default bindings in the client app are

    @@ -2084,7 +2111,7 @@ non-default context path or servlet path
    -

    These links show up in the metadata that is consumed by clients, and +

    These links show up in the metadata that is consumers by clients, and used in some scenarios to decide whether to send requests to your application, so it’s helpful if they are accurate.

    @@ -2499,6 +2526,9 @@ for details on the properties available.

    The same thing applies if you are using @SessionScope or @RequestScope. You will know when you need to do this because of a runtime exception that says it can’t find the scoped context.

    +
    +

    In particular you might be interested

    +

    Health Indicator

    @@ -2713,7 +2743,7 @@ explicitly in the @ComponentScan).

    IPing ribbonPing: NoOpPing

  • -

    ServerList<Server> ribbonServerList: ConfigurationBasedServerList

    +

    ServerList<Server> ribbonServerList: `ConfigurationBasedServerList

  • ServerListFilter<Server> ribbonServerListFilter: ZonePreferenceServerListFilter

    @@ -2758,7 +2788,7 @@ server list will be constructed with "zone" information as provided in the instance metadata (so on the client set eureka.instance.metadataMap.zone), and if that is missing it can use the domain name from the server hostname as a proxy for zone (if the -flag approximateZoneFromHostname is set). Once the zone information is +flag approximateZoneFromDomain is set). Once the zone information is available it can be used in a ServerListFilter (by default it will be used to locate a server in the same zone as the client because the default is a ZonePreferenceServerListFilter).

    @@ -2977,7 +3007,7 @@ configured routes map, then it will be unignored. Example:

    application.yml
     zuul:
    -  ignoredServices: '*'
    +  ignoredServices: *
       routes:
         users: /myusers/**
    @@ -3088,7 +3118,7 @@ Set that flag to "true" to have the Ribbon client automatically retry failed req the Ribbon client configuration).

  • -

    The X-Forwarded-Host header is added to the forwarded requests by +

    The X-Forwarded-Host header added to the forwarded requests by default. To turn it off set zuul.addProxyHeaders = false. The prefix path is stripped by default, and the request to the backend picks up a header "X-Forwarded-Prefix" ("/myusers" in the examples @@ -3501,7 +3531,7 @@ AQAjPgt3eFZQXwt8tsHAVv/QHiY5sI2dRcR+...