Browse Source

Sync docs from 2.1.x to gh-pages

gh-pages
buildmaster 5 years ago
parent
commit
67c7f1b443
  1. 4
      2.1.x/multi/multi__spring_cloud_context_application_context_services.html
  2. 4
      2.1.x/single/spring-cloud-commons.html
  3. 4
      2.1.x/spring-cloud-commons.xml

4
2.1.x/multi/multi__spring_cloud_context_application_context_services.html

@ -32,8 +32,10 @@ If there is a Config Server, every context in the hierarchy can also (in princip @@ -32,8 +32,10 @@ If there is a Config Server, every context in the hierarchy can also (in princip
Normal Spring application context behavior rules apply to property resolution: properties from a child context override those in
the parent, by name and also by property source name.
(If the child has a property source with the same name as the parent, the value from the parent is not included in the child).</p><p>Note that the <code class="literal">SpringApplicationBuilder</code> lets you share an <code class="literal">Environment</code> amongst the whole hierarchy, but that is not the default.
Thus, sibling contexts, in particular, do not need to have the same profiles or property sources, even though they may share common values with their parent.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="customizing-bootstrap-properties" href="#customizing-bootstrap-properties"></a>1.3&nbsp;Changing the Location of Bootstrap Properties</h2></div></div></div><p>The <code class="literal">bootstrap.yml</code> (or <code class="literal">.properties</code>) location can be specified by setting <code class="literal">spring.cloud.bootstrap.name</code> (default: <code class="literal">bootstrap</code>) or <code class="literal">spring.cloud.bootstrap.location</code> (default: empty)&#8201;&#8212;&#8201;for example, in System properties.
Thus, sibling contexts, in particular, do not need to have the same profiles or property sources, even though they may share common values with their parent.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="customizing-bootstrap-properties" href="#customizing-bootstrap-properties"></a>1.3&nbsp;Changing the Location of Bootstrap Properties</h2></div></div></div><p>The <code class="literal">bootstrap.yml</code> (or <code class="literal">.properties</code>) location can be specified by setting <code class="literal">spring.cloud.bootstrap.name</code> (default: <code class="literal">bootstrap</code>), <code class="literal">spring.cloud.bootstrap.location</code> (default: empty) or <code class="literal">spring.cloud.bootstrap.additional-location</code> (default: empty)&#8201;&#8212;&#8201;for example, in System properties.
Those properties behave like the <code class="literal">spring.config.*</code> variants with the same name.
With <code class="literal">spring.cloud.bootstrap.location</code> the default locations are replaced and only the specified ones are used.
To add locations to the list of default ones, <code class="literal">spring.cloud.bootstrap.additional-location</code> could be used.
In fact, they are used to set up the bootstrap <code class="literal">ApplicationContext</code> by setting those properties in its <code class="literal">Environment</code>.
If there is an active profile (from <code class="literal">spring.profiles.active</code> or through the <code class="literal">Environment</code> API in the
context you are building), properties in that profile get loaded as well, the same as in a regular Spring Boot app&#8201;&#8212;&#8201;for example, from <code class="literal">bootstrap-development.properties</code> for a <code class="literal">development</code> profile.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="overriding-bootstrap-properties" href="#overriding-bootstrap-properties"></a>1.4&nbsp;Overriding the Values of Remote Properties</h2></div></div></div><p>The property sources that are added to your application by the bootstrap context are often <span class="quote">&#8220;<span class="quote">remote</span>&#8221;</span> (from example, from Spring Cloud Config Server).

4
2.1.x/single/spring-cloud-commons.html

@ -38,8 +38,10 @@ If there is a Config Server, every context in the hierarchy can also (in princip @@ -38,8 +38,10 @@ If there is a Config Server, every context in the hierarchy can also (in princip
Normal Spring application context behavior rules apply to property resolution: properties from a child context override those in
the parent, by name and also by property source name.
(If the child has a property source with the same name as the parent, the value from the parent is not included in the child).</p><p>Note that the <code class="literal">SpringApplicationBuilder</code> lets you share an <code class="literal">Environment</code> amongst the whole hierarchy, but that is not the default.
Thus, sibling contexts, in particular, do not need to have the same profiles or property sources, even though they may share common values with their parent.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="customizing-bootstrap-properties" href="#customizing-bootstrap-properties"></a>1.3&nbsp;Changing the Location of Bootstrap Properties</h2></div></div></div><p>The <code class="literal">bootstrap.yml</code> (or <code class="literal">.properties</code>) location can be specified by setting <code class="literal">spring.cloud.bootstrap.name</code> (default: <code class="literal">bootstrap</code>) or <code class="literal">spring.cloud.bootstrap.location</code> (default: empty)&#8201;&#8212;&#8201;for example, in System properties.
Thus, sibling contexts, in particular, do not need to have the same profiles or property sources, even though they may share common values with their parent.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="customizing-bootstrap-properties" href="#customizing-bootstrap-properties"></a>1.3&nbsp;Changing the Location of Bootstrap Properties</h2></div></div></div><p>The <code class="literal">bootstrap.yml</code> (or <code class="literal">.properties</code>) location can be specified by setting <code class="literal">spring.cloud.bootstrap.name</code> (default: <code class="literal">bootstrap</code>), <code class="literal">spring.cloud.bootstrap.location</code> (default: empty) or <code class="literal">spring.cloud.bootstrap.additional-location</code> (default: empty)&#8201;&#8212;&#8201;for example, in System properties.
Those properties behave like the <code class="literal">spring.config.*</code> variants with the same name.
With <code class="literal">spring.cloud.bootstrap.location</code> the default locations are replaced and only the specified ones are used.
To add locations to the list of default ones, <code class="literal">spring.cloud.bootstrap.additional-location</code> could be used.
In fact, they are used to set up the bootstrap <code class="literal">ApplicationContext</code> by setting those properties in its <code class="literal">Environment</code>.
If there is an active profile (from <code class="literal">spring.profiles.active</code> or through the <code class="literal">Environment</code> API in the
context you are building), properties in that profile get loaded as well, the same as in a regular Spring Boot app&#8201;&#8212;&#8201;for example, from <code class="literal">bootstrap-development.properties</code> for a <code class="literal">development</code> profile.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="overriding-bootstrap-properties" href="#overriding-bootstrap-properties"></a>1.4&nbsp;Overriding the Values of Remote Properties</h2></div></div></div><p>The property sources that are added to your application by the bootstrap context are often <span class="quote">&#8220;<span class="quote">remote</span>&#8221;</span> (from example, from Spring Cloud Config Server).

4
2.1.x/spring-cloud-commons.xml

@ -97,8 +97,10 @@ Thus, sibling contexts, in particular, do not need to have the same profiles or @@ -97,8 +97,10 @@ Thus, sibling contexts, in particular, do not need to have the same profiles or
</section>
<section xml:id="customizing-bootstrap-properties">
<title>Changing the Location of Bootstrap Properties</title>
<simpara>The <literal>bootstrap.yml</literal> (or <literal>.properties</literal>) location can be specified by setting <literal>spring.cloud.bootstrap.name</literal> (default: <literal>bootstrap</literal>) or <literal>spring.cloud.bootstrap.location</literal> (default: empty)&#8201;&#8212;&#8201;for example, in System properties.
<simpara>The <literal>bootstrap.yml</literal> (or <literal>.properties</literal>) location can be specified by setting <literal>spring.cloud.bootstrap.name</literal> (default: <literal>bootstrap</literal>), <literal>spring.cloud.bootstrap.location</literal> (default: empty) or <literal>spring.cloud.bootstrap.additional-location</literal> (default: empty)&#8201;&#8212;&#8201;for example, in System properties.
Those properties behave like the <literal>spring.config.*</literal> variants with the same name.
With <literal>spring.cloud.bootstrap.location</literal> the default locations are replaced and only the specified ones are used.
To add locations to the list of default ones, <literal>spring.cloud.bootstrap.additional-location</literal> could be used.
In fact, they are used to set up the bootstrap <literal>ApplicationContext</literal> by setting those properties in its <literal>Environment</literal>.
If there is an active profile (from <literal>spring.profiles.active</literal> or through the <literal>Environment</literal> API in the
context you are building), properties in that profile get loaded as well, the same as in a regular Spring Boot app&#8201;&#8212;&#8201;for example, from <literal>bootstrap-development.properties</literal> for a <literal>development</literal> profile.</simpara>

Loading…
Cancel
Save