Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2019-09-10 15:55:28 +00:00
parent 8a7b27b756
commit 4a01443fd4
4 changed files with 302 additions and 83 deletions

View File

@@ -96,21 +96,34 @@ $(addBlockSwitches);
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="#_quick_start">Quick Start</a></li>
<li><a href="#_building">Building</a>
<li><a href="#quick-start">1. Quick Start</a></li>
<li><a href="#building">2. Building</a>
<ul class="sectlevel2">
<li><a href="#_basic_compile_and_test">Basic Compile and Test</a></li>
<li><a href="#_documentation">Documentation</a></li>
<li><a href="#_working_with_the_code">Working with the code</a></li>
<li><a href="#basic-compile-and-test">2.1. Basic Compile and Test</a></li>
<li><a href="#documentation">2.2. Documentation</a></li>
<li><a href="#working-with-the-code">2.3. Working with the code</a>
<ul class="sectlevel3">
<li><a href="#importing-into-eclipse-with-m2eclipse">2.3.1. Importing into eclipse with m2eclipse</a></li>
<li><a href="#importing-into-eclipse-without-m2eclipse">2.3.2. Importing into eclipse without m2eclipse</a></li>
</ul>
</li>
<li><a href="#_contributing">Contributing</a>
</ul>
</li>
<li><a href="#contributing">3. Contributing</a>
<ul class="sectlevel2">
<li><a href="#_sign_the_contributor_license_agreement">Sign the Contributor License Agreement</a></li>
<li><a href="#_code_of_conduct">Code of Conduct</a></li>
<li><a href="#_code_conventions_and_housekeeping">Code Conventions and Housekeeping</a></li>
<li><a href="#_checkstyle">Checkstyle</a></li>
<li><a href="#_ide_setup">IDE setup</a></li>
<li><a href="#sign-the-contributor-license-agreement">3.1. Sign the Contributor License Agreement</a></li>
<li><a href="#code-of-conduct">3.2. Code of Conduct</a></li>
<li><a href="#code-conventions-and-housekeeping">3.3. Code Conventions and Housekeeping</a></li>
<li><a href="#checkstyle">3.4. Checkstyle</a>
<ul class="sectlevel3">
<li><a href="#checkstyle-configuration">3.4.1. Checkstyle configuration</a></li>
</ul>
</li>
<li><a href="#ide-setup">3.5. IDE setup</a>
<ul class="sectlevel3">
<li><a href="#intellij-idea">3.5.1. Intellij IDEA</a></li>
</ul>
</li>
</ul>
</li>
</ul>
@@ -130,7 +143,7 @@ either an AMQP broker or Kafka as the transport.</p>
</div>
</div>
<div class="sect1">
<h2 id="_quick_start"><a class="link" href="#_quick_start">Quick Start</a></h2>
<h2 id="quick-start"><a class="anchor" href="#quick-start"></a><a class="link" href="#quick-start">1. Quick Start</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Spring Cloud Bus works by adding Spring Boot autconfiguration if it detects itself on the
@@ -177,10 +190,10 @@ works with <code>spring-cloud-bus</code>.
</div>
</div>
<div class="sect1">
<h2 id="_building"><a class="link" href="#_building">Building</a></h2>
<h2 id="building"><a class="anchor" href="#building"></a><a class="link" href="#building">2. Building</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_basic_compile_and_test"><a class="link" href="#_basic_compile_and_test">Basic Compile and Test</a></h3>
<h3 id="basic-compile-and-test"><a class="anchor" href="#basic-compile-and-test"></a><a class="link" href="#basic-compile-and-test">2.1. Basic Compile and Test</a></h3>
<div class="paragraph">
<p>To build the source you will need to install JDK 1.7.</p>
</div>
@@ -258,7 +271,7 @@ If all else fails, build with the command from <code>.travis.yml</code> (usually
</div>
</div>
<div class="sect2">
<h3 id="_documentation"><a class="link" href="#_documentation">Documentation</a></h3>
<h3 id="documentation"><a class="anchor" href="#documentation"></a><a class="link" href="#documentation">2.2. Documentation</a></h3>
<div class="paragraph">
<p>The spring-cloud-build module has a "docs" profile, and if you switch
that on it will try to build asciidoc sources from
@@ -271,7 +284,7 @@ a modified file in the correct place. Just commit it and push the change.</p>
</div>
</div>
<div class="sect2">
<h3 id="_working_with_the_code"><a class="link" href="#_working_with_the_code">Working with the code</a></h3>
<h3 id="working-with-the-code"><a class="anchor" href="#working-with-the-code"></a><a class="link" href="#working-with-the-code">2.3. Working with the code</a></h3>
<div class="paragraph">
<p>If you don&#8217;t have an IDE preference we would recommend that you use
<a href="https://www.springsource.com/developer/sts">Spring Tools Suite</a> or
@@ -280,7 +293,7 @@ a modified file in the correct place. Just commit it and push the change.</p>
should also work without issue as long as they use Maven 3.3.3 or better.</p>
</div>
<div class="sect3">
<h4 id="_importing_into_eclipse_with_m2eclipse"><a class="link" href="#_importing_into_eclipse_with_m2eclipse">Importing into eclipse with m2eclipse</a></h4>
<h4 id="importing-into-eclipse-with-m2eclipse"><a class="anchor" href="#importing-into-eclipse-with-m2eclipse"></a><a class="link" href="#importing-into-eclipse-with-m2eclipse">2.3.1. Importing into eclipse with m2eclipse</a></h4>
<div class="paragraph">
<p>We recommend the <a href="https://eclipse.org/m2e/">m2eclipse</a> eclipse plugin when working with
eclipse. If you don&#8217;t already have m2eclipse installed it is available from the "eclipse
@@ -307,7 +320,7 @@ pom into your <code>settings.xml</code>.
</div>
</div>
<div class="sect3">
<h4 id="_importing_into_eclipse_without_m2eclipse"><a class="link" href="#_importing_into_eclipse_without_m2eclipse">Importing into eclipse without m2eclipse</a></h4>
<h4 id="importing-into-eclipse-without-m2eclipse"><a class="anchor" href="#importing-into-eclipse-without-m2eclipse"></a><a class="link" href="#importing-into-eclipse-without-m2eclipse">2.3.2. Importing into eclipse without m2eclipse</a></h4>
<div class="paragraph">
<p>If you prefer not to use m2eclipse you can generate eclipse project metadata using the
following command:</p>
@@ -326,7 +339,7 @@ from the <code>file</code> menu.</p>
</div>
</div>
<div class="sect1">
<h2 id="_contributing"><a class="link" href="#_contributing">Contributing</a></h2>
<h2 id="contributing"><a class="anchor" href="#contributing"></a><a class="link" href="#contributing">3. Contributing</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Spring Cloud is released under the non-restrictive Apache 2.0 license,
@@ -336,7 +349,7 @@ to contribute even something trivial please do not hesitate, but
follow the guidelines below.</p>
</div>
<div class="sect2">
<h3 id="_sign_the_contributor_license_agreement"><a class="link" href="#_sign_the_contributor_license_agreement">Sign the Contributor License Agreement</a></h3>
<h3 id="sign-the-contributor-license-agreement"><a class="anchor" href="#sign-the-contributor-license-agreement"></a><a class="link" href="#sign-the-contributor-license-agreement">3.1. Sign the Contributor License Agreement</a></h3>
<div class="paragraph">
<p>Before we accept a non-trivial patch or pull request we will need you to sign the
<a href="https://cla.pivotal.io/sign/spring">Contributor License Agreement</a>.
@@ -347,7 +360,7 @@ given the ability to merge pull requests.</p>
</div>
</div>
<div class="sect2">
<h3 id="_code_of_conduct"><a class="link" href="#_code_of_conduct">Code of Conduct</a></h3>
<h3 id="code-of-conduct"><a class="anchor" href="#code-of-conduct"></a><a class="link" href="#code-of-conduct">3.2. Code of Conduct</a></h3>
<div class="paragraph">
<p>This project adheres to the Contributor Covenant <a href="https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc">code of
conduct</a>. By participating, you are expected to uphold this code. Please report
@@ -355,7 +368,7 @@ unacceptable behavior to <a href="mailto:spring-code-of-conduct@pivotal.io">spri
</div>
</div>
<div class="sect2">
<h3 id="_code_conventions_and_housekeeping"><a class="link" href="#_code_conventions_and_housekeeping">Code Conventions and Housekeeping</a></h3>
<h3 id="code-conventions-and-housekeeping"><a class="anchor" href="#code-conventions-and-housekeeping"></a><a class="link" href="#code-conventions-and-housekeeping">3.3. Code Conventions and Housekeeping</a></h3>
<div class="paragraph">
<p>None of these is essential for a pull request, but they will all help. They can also be
added after the original pull request but before a merge.</p>
@@ -403,7 +416,7 @@ message (where XXXX is the issue number).</p>
</div>
</div>
<div class="sect2">
<h3 id="_checkstyle"><a class="link" href="#_checkstyle">Checkstyle</a></h3>
<h3 id="checkstyle"><a class="anchor" href="#checkstyle"></a><a class="link" href="#checkstyle">3.4. Checkstyle</a></h3>
<div class="paragraph">
<p>Spring Cloud Build comes with a set of checkstyle rules. You can find them in the <code>spring-cloud-build-tools</code> module. The most notable files under the module are:</p>
</div>
@@ -436,7 +449,7 @@ message (where XXXX is the issue number).</p>
</table>
</div>
<div class="sect3">
<h4 id="_checkstyle_configuration"><a class="link" href="#_checkstyle_configuration">Checkstyle configuration</a></h4>
<h4 id="checkstyle-configuration"><a class="anchor" href="#checkstyle-configuration"></a><a class="link" href="#checkstyle-configuration">3.4.1. Checkstyle configuration</a></h4>
<div class="paragraph">
<p>Checkstyle rules are <strong>disabled by default</strong>. To add checkstyle to your project just define the following properties and plugins.</p>
</div>
@@ -506,11 +519,11 @@ message (where XXXX is the issue number).</p>
<div class="content">
<pre>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"https://www.puppycrawl.com/dtds/suppressions_1_1.dtd"&gt;
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"https://www.puppycrawl.com/dtds/suppressions_1_1.dtd"&gt;
&lt;suppressions&gt;
&lt;suppress files=".*ConfigServerApplication\.java" checks="HideUtilityClassConstructor"/&gt;
&lt;suppress files=".*ConfigClientWatch\.java" checks="LineLengthCheck"/&gt;
&lt;suppress files=".*ConfigServerApplication\.java" checks="HideUtilityClassConstructor"/&gt;
&lt;suppress files=".*ConfigClientWatch\.java" checks="LineLengthCheck"/&gt;
&lt;/suppressions&gt;</pre>
</div>
</div>
@@ -526,9 +539,9 @@ $ touch .springformat</code></pre>
</div>
</div>
<div class="sect2">
<h3 id="_ide_setup"><a class="link" href="#_ide_setup">IDE setup</a></h3>
<h3 id="ide-setup"><a class="anchor" href="#ide-setup"></a><a class="link" href="#ide-setup">3.5. IDE setup</a></h3>
<div class="sect3">
<h4 id="_intellij_idea"><a class="link" href="#_intellij_idea">Intellij IDEA</a></h4>
<h4 id="intellij-idea"><a class="anchor" href="#intellij-idea"></a><a class="link" href="#intellij-idea">3.5.1. Intellij IDEA</a></h4>
<div class="paragraph">
<p>In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin.
The following files can be found in the <a href="https://github.com/spring-cloud/spring-cloud-build/tree/master/spring-cloud-build-tools">Spring Cloud Build</a> project.</p>
@@ -600,15 +613,15 @@ The following files can be found in the <a href="https://github.com/spring-cloud
</div>
</div>
<div class="paragraph">
<p>Go to <code>File</code> &#8594; <code>Settings</code> &#8594; <code>Other settings</code> &#8594; <code>Checkstyle</code>. There click on the <code>+</code> icon in the <code>Configuration file</code> section. There, you&#8217;ll have to define where the checkstyle rules should be picked from. In the image above, we&#8217;ve picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build&#8217;s GitHub repository (e.g. for the <code>checkstyle.xml</code> : <code><a href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml" class="bare">https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml</a></code>). We need to provide the following variables:</p>
<p>Go to <code>File</code> &#8594; <code>Settings</code> &#8594; <code>Other settings</code> &#8594; <code>Checkstyle</code>. There click on the <code>+</code> icon in the <code>Configuration file</code> section. There, you&#8217;ll have to define where the checkstyle rules should be picked from. In the image above, we&#8217;ve picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build&#8217;s GitHub repository (e.g. for the <code>checkstyle.xml</code> : <code><a href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml" class="bare">raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml</a></code>). We need to provide the following variables:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>checkstyle.header.file</code> - please point it to the Spring Cloud Build&#8217;s, <code>spring-cloud-build-tools/src/main/resources/checkstyle/checkstyle-header.txt</code> file either in your cloned repo or via the <code><a href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt" class="bare">https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt</a></code> URL.</p>
<p><code>checkstyle.header.file</code> - please point it to the Spring Cloud Build&#8217;s, <code>spring-cloud-build-tools/src/main/resources/checkstyle/checkstyle-header.txt</code> file either in your cloned repo or via the <code><a href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt" class="bare">raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt</a></code> URL.</p>
</li>
<li>
<p><code>checkstyle.suppressions.file</code> - default suppressions. Please point it to the Spring Cloud Build&#8217;s, <code>spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml</code> file either in your cloned repo or via the <code><a href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml" class="bare">https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml</a></code> URL.</p>
<p><code>checkstyle.suppressions.file</code> - default suppressions. Please point it to the Spring Cloud Build&#8217;s, <code>spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml</code> file either in your cloned repo or via the <code><a href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml" class="bare">raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml</a></code> URL.</p>
</li>
<li>
<p><code>checkstyle.additional.suppressions.file</code> - this variable corresponds to suppressions in your local project. E.g. you&#8217;re working on <code>spring-cloud-contract</code>. Then point to the <code>project-root/src/checkstyle/checkstyle-suppressions.xml</code> folder. Example for <code>spring-cloud-contract</code> would be: <code>/home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml</code>.</p>

View File

@@ -0,0 +1,188 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.7.1">
<title>Common application properties</title>
<link rel="stylesheet" href="css/spring.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.hidden {
display: none;
}
.switch {
border-width: 1px 1px 0 1px;
border-style: solid;
border-color: #7a2518;
display: inline-block;
}
.switch--item {
padding: 10px;
background-color: #ffffff;
color: #7a2518;
display: inline-block;
cursor: pointer;
}
.switch--item:not(:first-child) {
border-width: 0 0 0 1px;
border-style: solid;
border-color: #7a2518;
}
.switch--item.selected {
background-color: #7a2519;
color: #ffffff;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
<script type="text/javascript">
function addBlockSwitches() {
$('.primary').each(function() {
primary = $(this);
createSwitchItem(primary, createBlockSwitch(primary)).item.addClass("selected");
primary.children('.title').remove();
});
$('.secondary').each(function(idx, node) {
secondary = $(node);
primary = findPrimary(secondary);
switchItem = createSwitchItem(secondary, primary.children('.switch'));
switchItem.content.addClass('hidden');
findPrimary(secondary).append(switchItem.content);
secondary.remove();
});
}
function createBlockSwitch(primary) {
blockSwitch = $('<div class="switch"></div>');
primary.prepend(blockSwitch);
return blockSwitch;
}
function findPrimary(secondary) {
candidate = secondary.prev();
while (!candidate.is('.primary')) {
candidate = candidate.prev();
}
return candidate;
}
function createSwitchItem(block, blockSwitch) {
blockName = block.children('.title').text();
content = block.children('.content').first().append(block.next('.colist'));
item = $('<div class="switch--item">' + blockName + '</div>');
item.on('click', '', content, function(e) {
$(this).addClass('selected');
$(this).siblings().removeClass('selected');
e.data.siblings('.content').addClass('hidden');
e.data.removeClass('hidden');
});
blockSwitch.append(item);
return {'item': item, 'content': content};
}
$(addBlockSwitches);
</script>
</head>
<body class="book toc2 toc-left">
<div id="header">
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="#common-application-properties">Appendix A: Common application properties</a></li>
</ul>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="common-application-properties"><a class="link" href="#common-application-properties">Appendix A: Common application properties</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Various properties can be specified inside your <code>application.properties</code> file, inside your <code>application.yml</code> file, or as command line switches.
This appendix provides a list of common Spring Cloud Bus properties and references to the underlying classes that consume them.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
Also, you can define your own properties.
</td>
</tr>
</table>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Default</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.cloud.bus.ack.destination-service</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Service that wants to listen to acks. By default null (meaning all services).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.cloud.bus.ack.enabled</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Flag to switch off acks (default on).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.cloud.bus.destination</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">springCloudBus</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Name of Spring Cloud Stream destination for messages.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.cloud.bus.enabled</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Flag to indicate that the bus is enabled.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.cloud.bus.env.enabled</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Flag to switch off environment change events (default on).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.cloud.bus.id</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">application</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The identifier for this application instance.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.cloud.bus.refresh.enabled</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Flag to switch off refresh events (default on).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.cloud.bus.trace.enabled</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Flag to switch on tracing of acks (default off).</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript" src="js/tocbot/tocbot.min.js"></script>
<script type="text/javascript" src="js/toc.js"></script>
<link rel="stylesheet" href="js/highlight/styles/atom-one-dark-reasonable.min.css">
<script src="js/highlight/highlight.min.js"></script>
<script>hljs.initHighlighting()</script>
</body>
</html>

View File

@@ -96,23 +96,24 @@ $(addBlockSwitches);
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="#_quick_start">Quick Start</a></li>
<li><a href="#_bus_endpoints">Bus Endpoints</a>
<li><a href="#quick-start">1. Quick Start</a></li>
<li><a href="#bus-endpoints">2. Bus Endpoints</a>
<ul class="sectlevel2">
<li><a href="#_bus_refresh_endpoint">Bus Refresh Endpoint</a></li>
<li><a href="#_bus_env_endpoint">Bus Env Endpoint</a></li>
<li><a href="#bus-refresh-endpoint">2.1. Bus Refresh Endpoint</a></li>
<li><a href="#bus-env-endpoint">2.2. Bus Env Endpoint</a></li>
</ul>
</li>
<li><a href="#_addressing_an_instance">Addressing an Instance</a></li>
<li><a href="#_addressing_all_instances_of_a_service">Addressing All Instances of a Service</a></li>
<li><a href="#_service_id_must_be_unique">Service ID Must Be Unique</a></li>
<li><a href="#_customizing_the_message_broker">Customizing the Message Broker</a></li>
<li><a href="#_tracing_bus_events">Tracing Bus Events</a></li>
<li><a href="#_broadcasting_your_own_events">Broadcasting Your Own Events</a>
<li><a href="#addressing-an-instance">3. Addressing an Instance</a></li>
<li><a href="#addressing-all-instances-of-a-service">4. Addressing All Instances of a Service</a></li>
<li><a href="#service-id-must-be-unique">5. Service ID Must Be Unique</a></li>
<li><a href="#customizing-the-message-broker">6. Customizing the Message Broker</a></li>
<li><a href="#tracing-bus-events">7. Tracing Bus Events</a></li>
<li><a href="#broadcasting-your-own-events">8. Broadcasting Your Own Events</a>
<ul class="sectlevel2">
<li><a href="#_registering_events_in_custom_packages">Registering events in custom packages</a></li>
<li><a href="#registering-events-in-custom-packages">8.1. Registering events in custom packages</a></li>
</ul>
</li>
<li><a href="#configuration-properties">9. Configuration properties</a></li>
</ul>
</div>
</div>
@@ -134,7 +135,7 @@ either an AMQP broker or Kafka as the transport.</p>
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Spring Cloud is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at <a href="https://github.com/spring-cloud/spring-cloud-config/tree/master/docs/src/main/asciidoc">github</a>.
Spring Cloud is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at {docslink}[github].
</td>
</tr>
</table>
@@ -142,7 +143,7 @@ Spring Cloud is released under the non-restrictive Apache 2.0 license. If you wo
</div>
</div>
<div class="sect1">
<h2 id="_quick_start"><a class="link" href="#_quick_start">Quick Start</a></h2>
<h2 id="quick-start"><a class="anchor" href="#quick-start"></a><a class="link" href="#quick-start">1. Quick Start</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Spring Cloud Bus works by adding Spring Boot autconfiguration if it detects itself on the
@@ -189,7 +190,7 @@ works with <code>spring-cloud-bus</code>.
</div>
</div>
<div class="sect1">
<h2 id="_bus_endpoints"><a class="link" href="#_bus_endpoints">Bus Endpoints</a></h2>
<h2 id="bus-endpoints"><a class="anchor" href="#bus-endpoints"></a><a class="link" href="#bus-endpoints">2. Bus Endpoints</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Spring Cloud Bus provides two endpoints, <code>/actuator/bus-refresh</code> and <code>/actuator/bus-env</code>
@@ -197,7 +198,7 @@ that correspond to individual actuator endpoints in Spring Cloud Commons,
<code>/actuator/refresh</code> and <code>/actuator/env</code> respectively.</p>
</div>
<div class="sect2">
<h3 id="_bus_refresh_endpoint"><a class="link" href="#_bus_refresh_endpoint">Bus Refresh Endpoint</a></h3>
<h3 id="bus-refresh-endpoint"><a class="anchor" href="#bus-refresh-endpoint"></a><a class="link" href="#bus-refresh-endpoint">2.1. Bus Refresh Endpoint</a></h3>
<div class="paragraph">
<p>The <code>/actuator/bus-refresh</code> endpoint clears the <code>RefreshScope</code> cache and rebinds
<code>@ConfigurationProperties</code>. See the <a href="#refresh-scope">Refresh Scope</a> documentation for
@@ -214,7 +215,7 @@ application:</p>
</div>
</div>
<div class="sect2">
<h3 id="_bus_env_endpoint"><a class="link" href="#_bus_env_endpoint">Bus Env Endpoint</a></h3>
<h3 id="bus-env-endpoint"><a class="anchor" href="#bus-env-endpoint"></a><a class="link" href="#bus-env-endpoint">2.2. Bus Env Endpoint</a></h3>
<div class="paragraph">
<p>The <code>/actuator/bus-env</code> endpoint updates each instances environment with the specified
key/value pair across multiple instances.</p>
@@ -234,8 +235,8 @@ application:</p>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-json hljs" data-lang="json">{
"name": "key1",
"value": "value1"
"name": "key1",
"value": "value1"
}</code></pre>
</div>
</div>
@@ -243,7 +244,7 @@ application:</p>
</div>
</div>
<div class="sect1">
<h2 id="_addressing_an_instance"><a class="link" href="#_addressing_an_instance">Addressing an Instance</a></h2>
<h2 id="addressing-an-instance"><a class="anchor" href="#addressing-an-instance"></a><a class="link" href="#addressing-an-instance">3. Addressing an Instance</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Each instance of the application has a service ID, whose value can be set with
@@ -276,7 +277,7 @@ ignore it.</p>
</div>
</div>
<div class="sect1">
<h2 id="_addressing_all_instances_of_a_service"><a class="link" href="#_addressing_all_instances_of_a_service">Addressing All Instances of a Service</a></h2>
<h2 id="addressing-all-instances-of-a-service"><a class="anchor" href="#addressing-all-instances-of-a-service"></a><a class="link" href="#addressing-all-instances-of-a-service">4. Addressing All Instances of a Service</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The &#8220;destination&#8221; parameter is used in a Spring <code>PathMatcher</code> (with the path separator
@@ -287,7 +288,7 @@ from earlier, <code>/bus-env/customers:**</code> targets all instances of the
</div>
</div>
<div class="sect1">
<h2 id="_service_id_must_be_unique"><a class="link" href="#_service_id_must_be_unique">Service ID Must Be Unique</a></h2>
<h2 id="service-id-must-be-unique"><a class="anchor" href="#service-id-must-be-unique"></a><a class="link" href="#service-id-must-be-unique">5. Service ID Must Be Unique</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The bus tries twice to eliminate processing an event&#8201;&#8212;&#8201;once from the original
@@ -301,7 +302,7 @@ something unique for each instance of a service.</p>
</div>
</div>
<div class="sect1">
<h2 id="_customizing_the_message_broker"><a class="link" href="#_customizing_the_message_broker">Customizing the Message Broker</a></h2>
<h2 id="customizing-the-message-broker"><a class="anchor" href="#customizing-the-message-broker"></a><a class="link" href="#customizing-the-message-broker">6. Customizing the Message Broker</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Spring Cloud Bus uses <a href="https://cloud.spring.io/spring-cloud-stream">Spring Cloud Stream</a> to
@@ -322,7 +323,7 @@ Stream documentation.</p>
</div>
</div>
<div class="sect1">
<h2 id="_tracing_bus_events"><a class="link" href="#_tracing_bus_events">Tracing Bus Events</a></h2>
<h2 id="tracing-bus-events"><a class="anchor" href="#tracing-bus-events"></a><a class="link" href="#tracing-bus-events">7. Tracing Bus Events</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Bus events (subclasses of <code>RemoteApplicationEvent</code>) can be traced by setting
@@ -392,7 +393,7 @@ queries on the data or forward it to a specialized tracing service.
</div>
</div>
<div class="sect1">
<h2 id="_broadcasting_your_own_events"><a class="link" href="#_broadcasting_your_own_events">Broadcasting Your Own Events</a></h2>
<h2 id="broadcasting-your-own-events"><a class="anchor" href="#broadcasting-your-own-events"></a><a class="link" href="#broadcasting-your-own-events">8. Broadcasting Your Own Events</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The Bus can carry any event of type <code>RemoteApplicationEvent</code>. The default transport is
@@ -417,7 +418,7 @@ Both the producer and the consumer need access to the class definition.
</table>
</div>
<div class="sect2">
<h3 id="_registering_events_in_custom_packages"><a class="link" href="#_registering_events_in_custom_packages">Registering events in custom packages</a></h3>
<h3 id="registering-events-in-custom-packages"><a class="anchor" href="#registering-events-in-custom-packages"></a><a class="link" href="#registering-events-in-custom-packages">8.1. Registering events in custom packages</a></h3>
<div class="paragraph">
<p>If you cannot or do not want to use a subpackage of <code>org.springframework.cloud.bus.event</code>
for your custom events, you must specify which packages to scan for events of type
@@ -493,6 +494,14 @@ You can specify multiple base packages to scan.
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuration-properties"><a class="anchor" href="#configuration-properties"></a><a class="link" href="#configuration-properties">9. Configuration properties</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>To see the list of all Bus related configuration properties please check <a href="appendix.html">the Appendix page</a>.</p>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/tocbot/tocbot.min.js"></script>
<script type="text/javascript" src="js/toc.js"></script>

View File

@@ -96,23 +96,24 @@ $(addBlockSwitches);
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="#_quick_start">Quick Start</a></li>
<li><a href="#_bus_endpoints">Bus Endpoints</a>
<li><a href="#quick-start">1. Quick Start</a></li>
<li><a href="#bus-endpoints">2. Bus Endpoints</a>
<ul class="sectlevel2">
<li><a href="#_bus_refresh_endpoint">Bus Refresh Endpoint</a></li>
<li><a href="#_bus_env_endpoint">Bus Env Endpoint</a></li>
<li><a href="#bus-refresh-endpoint">2.1. Bus Refresh Endpoint</a></li>
<li><a href="#bus-env-endpoint">2.2. Bus Env Endpoint</a></li>
</ul>
</li>
<li><a href="#_addressing_an_instance">Addressing an Instance</a></li>
<li><a href="#_addressing_all_instances_of_a_service">Addressing All Instances of a Service</a></li>
<li><a href="#_service_id_must_be_unique">Service ID Must Be Unique</a></li>
<li><a href="#_customizing_the_message_broker">Customizing the Message Broker</a></li>
<li><a href="#_tracing_bus_events">Tracing Bus Events</a></li>
<li><a href="#_broadcasting_your_own_events">Broadcasting Your Own Events</a>
<li><a href="#addressing-an-instance">3. Addressing an Instance</a></li>
<li><a href="#addressing-all-instances-of-a-service">4. Addressing All Instances of a Service</a></li>
<li><a href="#service-id-must-be-unique">5. Service ID Must Be Unique</a></li>
<li><a href="#customizing-the-message-broker">6. Customizing the Message Broker</a></li>
<li><a href="#tracing-bus-events">7. Tracing Bus Events</a></li>
<li><a href="#broadcasting-your-own-events">8. Broadcasting Your Own Events</a>
<ul class="sectlevel2">
<li><a href="#_registering_events_in_custom_packages">Registering events in custom packages</a></li>
<li><a href="#registering-events-in-custom-packages">8.1. Registering events in custom packages</a></li>
</ul>
</li>
<li><a href="#configuration-properties">9. Configuration properties</a></li>
</ul>
</div>
</div>
@@ -134,7 +135,7 @@ either an AMQP broker or Kafka as the transport.</p>
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Spring Cloud is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at <a href="https://github.com/spring-cloud/spring-cloud-config/tree/master/docs/src/main/asciidoc">github</a>.
Spring Cloud is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at {docslink}[github].
</td>
</tr>
</table>
@@ -142,7 +143,7 @@ Spring Cloud is released under the non-restrictive Apache 2.0 license. If you wo
</div>
</div>
<div class="sect1">
<h2 id="_quick_start"><a class="link" href="#_quick_start">Quick Start</a></h2>
<h2 id="quick-start"><a class="anchor" href="#quick-start"></a><a class="link" href="#quick-start">1. Quick Start</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Spring Cloud Bus works by adding Spring Boot autconfiguration if it detects itself on the
@@ -189,7 +190,7 @@ works with <code>spring-cloud-bus</code>.
</div>
</div>
<div class="sect1">
<h2 id="_bus_endpoints"><a class="link" href="#_bus_endpoints">Bus Endpoints</a></h2>
<h2 id="bus-endpoints"><a class="anchor" href="#bus-endpoints"></a><a class="link" href="#bus-endpoints">2. Bus Endpoints</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Spring Cloud Bus provides two endpoints, <code>/actuator/bus-refresh</code> and <code>/actuator/bus-env</code>
@@ -197,7 +198,7 @@ that correspond to individual actuator endpoints in Spring Cloud Commons,
<code>/actuator/refresh</code> and <code>/actuator/env</code> respectively.</p>
</div>
<div class="sect2">
<h3 id="_bus_refresh_endpoint"><a class="link" href="#_bus_refresh_endpoint">Bus Refresh Endpoint</a></h3>
<h3 id="bus-refresh-endpoint"><a class="anchor" href="#bus-refresh-endpoint"></a><a class="link" href="#bus-refresh-endpoint">2.1. Bus Refresh Endpoint</a></h3>
<div class="paragraph">
<p>The <code>/actuator/bus-refresh</code> endpoint clears the <code>RefreshScope</code> cache and rebinds
<code>@ConfigurationProperties</code>. See the <a href="#refresh-scope">Refresh Scope</a> documentation for
@@ -214,7 +215,7 @@ application:</p>
</div>
</div>
<div class="sect2">
<h3 id="_bus_env_endpoint"><a class="link" href="#_bus_env_endpoint">Bus Env Endpoint</a></h3>
<h3 id="bus-env-endpoint"><a class="anchor" href="#bus-env-endpoint"></a><a class="link" href="#bus-env-endpoint">2.2. Bus Env Endpoint</a></h3>
<div class="paragraph">
<p>The <code>/actuator/bus-env</code> endpoint updates each instances environment with the specified
key/value pair across multiple instances.</p>
@@ -234,8 +235,8 @@ application:</p>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-json hljs" data-lang="json">{
"name": "key1",
"value": "value1"
"name": "key1",
"value": "value1"
}</code></pre>
</div>
</div>
@@ -243,7 +244,7 @@ application:</p>
</div>
</div>
<div class="sect1">
<h2 id="_addressing_an_instance"><a class="link" href="#_addressing_an_instance">Addressing an Instance</a></h2>
<h2 id="addressing-an-instance"><a class="anchor" href="#addressing-an-instance"></a><a class="link" href="#addressing-an-instance">3. Addressing an Instance</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Each instance of the application has a service ID, whose value can be set with
@@ -276,7 +277,7 @@ ignore it.</p>
</div>
</div>
<div class="sect1">
<h2 id="_addressing_all_instances_of_a_service"><a class="link" href="#_addressing_all_instances_of_a_service">Addressing All Instances of a Service</a></h2>
<h2 id="addressing-all-instances-of-a-service"><a class="anchor" href="#addressing-all-instances-of-a-service"></a><a class="link" href="#addressing-all-instances-of-a-service">4. Addressing All Instances of a Service</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The &#8220;destination&#8221; parameter is used in a Spring <code>PathMatcher</code> (with the path separator
@@ -287,7 +288,7 @@ from earlier, <code>/bus-env/customers:**</code> targets all instances of the
</div>
</div>
<div class="sect1">
<h2 id="_service_id_must_be_unique"><a class="link" href="#_service_id_must_be_unique">Service ID Must Be Unique</a></h2>
<h2 id="service-id-must-be-unique"><a class="anchor" href="#service-id-must-be-unique"></a><a class="link" href="#service-id-must-be-unique">5. Service ID Must Be Unique</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The bus tries twice to eliminate processing an event&#8201;&#8212;&#8201;once from the original
@@ -301,7 +302,7 @@ something unique for each instance of a service.</p>
</div>
</div>
<div class="sect1">
<h2 id="_customizing_the_message_broker"><a class="link" href="#_customizing_the_message_broker">Customizing the Message Broker</a></h2>
<h2 id="customizing-the-message-broker"><a class="anchor" href="#customizing-the-message-broker"></a><a class="link" href="#customizing-the-message-broker">6. Customizing the Message Broker</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Spring Cloud Bus uses <a href="https://cloud.spring.io/spring-cloud-stream">Spring Cloud Stream</a> to
@@ -322,7 +323,7 @@ Stream documentation.</p>
</div>
</div>
<div class="sect1">
<h2 id="_tracing_bus_events"><a class="link" href="#_tracing_bus_events">Tracing Bus Events</a></h2>
<h2 id="tracing-bus-events"><a class="anchor" href="#tracing-bus-events"></a><a class="link" href="#tracing-bus-events">7. Tracing Bus Events</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Bus events (subclasses of <code>RemoteApplicationEvent</code>) can be traced by setting
@@ -392,7 +393,7 @@ queries on the data or forward it to a specialized tracing service.
</div>
</div>
<div class="sect1">
<h2 id="_broadcasting_your_own_events"><a class="link" href="#_broadcasting_your_own_events">Broadcasting Your Own Events</a></h2>
<h2 id="broadcasting-your-own-events"><a class="anchor" href="#broadcasting-your-own-events"></a><a class="link" href="#broadcasting-your-own-events">8. Broadcasting Your Own Events</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The Bus can carry any event of type <code>RemoteApplicationEvent</code>. The default transport is
@@ -417,7 +418,7 @@ Both the producer and the consumer need access to the class definition.
</table>
</div>
<div class="sect2">
<h3 id="_registering_events_in_custom_packages"><a class="link" href="#_registering_events_in_custom_packages">Registering events in custom packages</a></h3>
<h3 id="registering-events-in-custom-packages"><a class="anchor" href="#registering-events-in-custom-packages"></a><a class="link" href="#registering-events-in-custom-packages">8.1. Registering events in custom packages</a></h3>
<div class="paragraph">
<p>If you cannot or do not want to use a subpackage of <code>org.springframework.cloud.bus.event</code>
for your custom events, you must specify which packages to scan for events of type
@@ -493,6 +494,14 @@ You can specify multiple base packages to scan.
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuration-properties"><a class="anchor" href="#configuration-properties"></a><a class="link" href="#configuration-properties">9. Configuration properties</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>To see the list of all Bus related configuration properties please check <a href="appendix.html">the Appendix page</a>.</p>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/tocbot/tocbot.min.js"></script>
<script type="text/javascript" src="js/toc.js"></script>