Browse Source

Sync docs from master to gh-pages

pull/507/head
buildmaster 6 years ago
parent
commit
7cfff1ade4
  1. 4
      multi/multi__spring_cloud_context_application_context_services.html
  2. 4
      single/spring-cloud-commons.html
  3. 5
      spring-cloud-commons.xml

4
multi/multi__spring_cloud_context_application_context_services.html

@ -74,7 +74,9 @@ Then, the next time something borrows a connection from the pool, it gets one wi @@ -74,7 +74,9 @@ Then, the next time something borrows a connection from the pool, it gets one wi
annotation on some beans which can be only initialized once. If a bean
is "immutable", you will have to either annotate the bean with <code class="literal">@RefreshScope</code>
or specify the classname under the property key
<code class="literal">spring.cloud.refresh.extra-refreshable</code>.</p><p>Refresh scope beans are lazy proxies that initialize when they are used (that is, when a method is called), and the scope acts as a cache of initialized values.
<code class="literal">spring.cloud.refresh.extra-refreshable</code>.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>If you create a <code class="literal">DataSource</code> bean yourself and the implementation is a <code class="literal">HikariDataSource</code>, return the
most specific type, in this case <code class="literal">HikariDataSource</code>. Otherwise, you will need to set
<code class="literal">spring.cloud.refresh.extra-refreshable=javax.sql.DataSource</code>.</p></td></tr></table></div><p>Refresh scope beans are lazy proxies that initialize when they are used (that is, when a method is called), and the scope acts as a cache of initialized values.
To force a bean to re-initialize on the next method call, you must invalidate its cache entry.</p><p>The <code class="literal">RefreshScope</code> is a bean in the context and has a public <code class="literal">refreshAll()</code> method to refresh all beans in the scope by clearing the target cache.
The <code class="literal">/refresh</code> endpoint exposes this functionality (over HTTP or JMX).
To refresh an individual bean by name, there is also a <code class="literal">refresh(String)</code> method.</p><p>To expose the <code class="literal">/refresh</code> endpoint, you need to add following configuration to your application:</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute">management</span>:

4
single/spring-cloud-commons.html

@ -80,7 +80,9 @@ Then, the next time something borrows a connection from the pool, it gets one wi @@ -80,7 +80,9 @@ Then, the next time something borrows a connection from the pool, it gets one wi
annotation on some beans which can be only initialized once. If a bean
is "immutable", you will have to either annotate the bean with <code class="literal">@RefreshScope</code>
or specify the classname under the property key
<code class="literal">spring.cloud.refresh.extra-refreshable</code>.</p><p>Refresh scope beans are lazy proxies that initialize when they are used (that is, when a method is called), and the scope acts as a cache of initialized values.
<code class="literal">spring.cloud.refresh.extra-refreshable</code>.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>If you create a <code class="literal">DataSource</code> bean yourself and the implementation is a <code class="literal">HikariDataSource</code>, return the
most specific type, in this case <code class="literal">HikariDataSource</code>. Otherwise, you will need to set
<code class="literal">spring.cloud.refresh.extra-refreshable=javax.sql.DataSource</code>.</p></td></tr></table></div><p>Refresh scope beans are lazy proxies that initialize when they are used (that is, when a method is called), and the scope acts as a cache of initialized values.
To force a bean to re-initialize on the next method call, you must invalidate its cache entry.</p><p>The <code class="literal">RefreshScope</code> is a bean in the context and has a public <code class="literal">refreshAll()</code> method to refresh all beans in the scope by clearing the target cache.
The <code class="literal">/refresh</code> endpoint exposes this functionality (over HTTP or JMX).
To refresh an individual bean by name, there is also a <code class="literal">refresh(String)</code> method.</p><p>To expose the <code class="literal">/refresh</code> endpoint, you need to add following configuration to your application:</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute">management</span>:

5
spring-cloud-commons.xml

@ -194,6 +194,11 @@ annotation on some beans which can be only initialized once. If a bean @@ -194,6 +194,11 @@ annotation on some beans which can be only initialized once. If a bean
is "immutable", you will have to either annotate the bean with <literal>@RefreshScope</literal>
or specify the classname under the property key
<literal>spring.cloud.refresh.extra-refreshable</literal>.</simpara>
<important>
<simpara>If you create a <literal>DataSource</literal> bean yourself and the implementation is a <literal>HikariDataSource</literal>, return the
most specific type, in this case <literal>HikariDataSource</literal>. Otherwise, you will need to set
<literal>spring.cloud.refresh.extra-refreshable=javax.sql.DataSource</literal>.</simpara>
</important>
<simpara>Refresh scope beans are lazy proxies that initialize when they are used (that is, when a method is called), and the scope acts as a cache of initialized values.
To force a bean to re-initialize on the next method call, you must invalidate its cache entry.</simpara>
<simpara>The <literal>RefreshScope</literal> is a bean in the context and has a public <literal>refreshAll()</literal> method to refresh all beans in the scope by clearing the target cache.

Loading…
Cancel
Save