Sync docs from master to gh-pages
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>6. Stub Runner for Messaging</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="multi_spring-cloud-contract.html" title="Spring Cloud Contract"><link rel="up" href="multi_spring-cloud-contract.html" title="Spring Cloud Contract"><link rel="prev" href="multi__spring_cloud_contract_stub_runner.html" title="5. Spring Cloud Contract Stub Runner"><link rel="next" href="multi__contract_dsl.html" title="7. Contract DSL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6. Stub Runner for Messaging</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__spring_cloud_contract_stub_runner.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="multi__contract_dsl.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_stub_runner_for_messaging" href="#_stub_runner_for_messaging"></a>6. Stub Runner for Messaging</h1></div></div></div><p>Stub Runner has the functionality to run the published stubs in memory. It can integrate with the following frameworks out of the box</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Spring Integration</li><li class="listitem">Spring Cloud Stream</li><li class="listitem">Apache Camel</li><li class="listitem">Spring AMQP</li></ul></div><p>It also provides points of entry to integrate with any other solution on the market.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_stub_triggering" href="#_stub_triggering"></a>6.1 Stub triggering</h2></div></div></div><p>To trigger a message it’s enough to use the <code class="literal">StubTrigger</code> interface:</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">package</span> org.springframework.cloud.contract.stubrunner;
|
||||
<title>6. Stub Runner for Messaging</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="multi_spring-cloud-contract.html" title="Spring Cloud Contract"><link rel="up" href="multi_spring-cloud-contract.html" title="Spring Cloud Contract"><link rel="prev" href="multi__spring_cloud_contract_stub_runner.html" title="5. Spring Cloud Contract Stub Runner"><link rel="next" href="multi__contract_dsl.html" title="7. Contract DSL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6. Stub Runner for Messaging</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__spring_cloud_contract_stub_runner.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="multi__contract_dsl.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_stub_runner_for_messaging" href="#_stub_runner_for_messaging"></a>6. Stub Runner for Messaging</h1></div></div></div><p>Stub Runner has the functionality to run the published stubs in memory. It can integrate with the following frameworks out of the box</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Spring Integration</li><li class="listitem">Spring Cloud Stream</li><li class="listitem">Apache Camel</li><li class="listitem">Spring AMQP</li></ul></div><p>It also provides points of entry to integrate with any other solution on the market.</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 have multiple frameworks on the classpath Stub Runner will need to
|
||||
define which one should be used. Let’s assume that you have both AMQP, Spring Cloud Stream and Spring Integration
|
||||
on the classpath. Then you need to set <code class="literal">stubrunner.stream.enabled=false</code> and <code class="literal">stubrunner.integration.enabled=false</code>.
|
||||
That way the only remaining framework is Spring AMQP.</p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_stub_triggering" href="#_stub_triggering"></a>6.1 Stub triggering</h2></div></div></div><p>To trigger a message it’s enough to use the <code class="literal">StubTrigger</code> interface:</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">package</span> org.springframework.cloud.contract.stubrunner;
|
||||
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">import</span> java.util.Collection;
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">import</span> java.util.Map;
|
||||
@@ -43,7 +46,7 @@
|
||||
}</pre><p>For convenience the <code class="literal">StubFinder</code> interface extends <code class="literal">StubTrigger</code> so it’s enough to use only one in your tests.</p><p><code class="literal">StubTrigger</code> gives you the following options to trigger a message:</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_trigger_by_label" href="#_trigger_by_label"></a>6.1.1 Trigger by label</h3></div></div></div><pre class="programlisting">stubFinder.trigger(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'return_book_1'</span>)</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_trigger_by_group_and_artifact_ids" href="#_trigger_by_group_and_artifact_ids"></a>6.1.2 Trigger by group and artifact ids</h3></div></div></div><pre class="programlisting">stubFinder.trigger(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'org.springframework.cloud.contract.verifier.stubs:camelService'</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'return_book_1'</span>)</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_trigger_by_artifact_ids" href="#_trigger_by_artifact_ids"></a>6.1.3 Trigger by artifact ids</h3></div></div></div><pre class="programlisting">stubFinder.trigger(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'camelService'</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'return_book_1'</span>)</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_trigger_all_messages" href="#_trigger_all_messages"></a>6.1.4 Trigger all messages</h3></div></div></div><pre class="programlisting">stubFinder.trigger()</pre></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_stub_runner_camel" href="#_stub_runner_camel"></a>6.2 Stub Runner Camel</h2></div></div></div><p>Spring Cloud Contract Verifier Stub Runner’s messaging module gives you an easy way to integrate with Apache Camel.
|
||||
For the provided artifacts it will automatically download the stubs and register the required
|
||||
routes.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_adding_it_to_the_project" href="#_adding_it_to_the_project"></a>6.2.1 Adding it to the project</h3></div></div></div><p>It’s enough to have both Apache Camel and Spring Cloud Contract Stub Runner on classpath.
|
||||
Remember to annotate your test class with <code class="literal">@AutoConfigureStubRunner</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_examples" href="#_examples"></a>6.2.2 Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_stubs_structure" href="#_stubs_structure"></a>Stubs structure</h4></div></div></div><p>Let us assume that we have the following Maven repository with a deployed stubs for the
|
||||
Remember to annotate your test class with <code class="literal">@AutoConfigureStubRunner</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_disabling_the_functionality" href="#_disabling_the_functionality"></a>6.2.2 Disabling the functionality</h3></div></div></div><p>If you need to disable this functionality just pass <code class="literal">stubrunner.camel.enabled=false</code> property.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_examples" href="#_examples"></a>6.2.3 Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_stubs_structure" href="#_stubs_structure"></a>Stubs structure</h4></div></div></div><p>Let us assume that we have the following Maven repository with a deployed stubs for the
|
||||
<code class="literal">camelService</code> application.</p><pre class="programlisting">└── .m2
|
||||
└── repository
|
||||
└── io
|
||||
@@ -101,7 +104,7 @@ assertThatBodyContainsBookNameFoo(receivedMessage.in.body)
|
||||
receivedMessage.in.headers.get(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'BOOK-NAME'</span>) == <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'foo'</span></pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_scenario_3_input_with_no_output" href="#_scenario_3_input_with_no_output"></a>Scenario 3 (input with no output)</h4></div></div></div><p>Since the route is set for you it’s enough to just send a message to the <code class="literal">jms:output</code> destination.</p><pre class="programlisting">camelContext.createProducerTemplate().sendBodyAndHeaders(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'jms:delete'</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">new</span> BookReturned(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'foo'</span>), [sample: <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'header'</span>])</pre></div></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_stub_runner_integration" href="#_stub_runner_integration"></a>6.3 Stub Runner Integration</h2></div></div></div><p>Spring Cloud Contract Verifier Stub Runner’s messaging module gives you an easy way to integrate with Spring Integration.
|
||||
For the provided artifacts it will automatically download the stubs and register the required
|
||||
routes.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_adding_it_to_the_project_2" href="#_adding_it_to_the_project_2"></a>6.3.1 Adding it to the project</h3></div></div></div><p>It’s enough to have both Spring Integration and Spring Cloud Contract Stub Runner on classpath.
|
||||
Remember to annotate your test class with <code class="literal">@AutoConfigureStubRunner</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_examples_2" href="#_examples_2"></a>6.3.2 Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_stubs_structure_2" href="#_stubs_structure_2"></a>Stubs structure</h4></div></div></div><p>Let us assume that we have the following Maven repository with a deployed stubs for the
|
||||
Remember to annotate your test class with <code class="literal">@AutoConfigureStubRunner</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_disabling_the_functionality_2" href="#_disabling_the_functionality_2"></a>6.3.2 Disabling the functionality</h3></div></div></div><p>If you need to disable this functionality just pass <code class="literal">stubrunner.integration.enabled=false</code> property.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_examples_2" href="#_examples_2"></a>6.3.3 Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_stubs_structure_2" href="#_stubs_structure_2"></a>Stubs structure</h4></div></div></div><p>Let us assume that we have the following Maven repository with a deployed stubs for the
|
||||
<code class="literal">integrationService</code> application.</p><pre class="programlisting">└── .m2
|
||||
└── repository
|
||||
└── io
|
||||
@@ -188,7 +191,7 @@ channel name.</p></td></tr></table></div><div class="important" style="margin-le
|
||||
</p><p class="secondary"><b>Gradle. </b>
|
||||
</p><pre class="programlisting">testCompile <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">"org.springframework.cloud:spring-cloud-stream-test-support"</span></pre><p class="secondary">
|
||||
</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_adding_it_to_the_project_3" href="#_adding_it_to_the_project_3"></a>6.4.1 Adding it to the project</h3></div></div></div><p>It’s enough to have both Spring Cloud Stream and Spring Cloud Contract Stub Runner on classpath.
|
||||
Remember to annotate your test class with <code class="literal">@AutoConfigureStubRunner</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_examples_3" href="#_examples_3"></a>6.4.2 Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_stubs_structure_3" href="#_stubs_structure_3"></a>Stubs structure</h4></div></div></div><p>Let us assume that we have the following Maven repository with a deployed stubs for the
|
||||
Remember to annotate your test class with <code class="literal">@AutoConfigureStubRunner</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_disabling_the_functionality_3" href="#_disabling_the_functionality_3"></a>6.4.2 Disabling the functionality</h3></div></div></div><p>If you need to disable this functionality just pass <code class="literal">stubrunner.stream.enabled=false</code> property.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_examples_3" href="#_examples_3"></a>6.4.3 Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_stubs_structure_3" href="#_stubs_structure_3"></a>Stubs structure</h4></div></div></div><p>Let us assume that we have the following Maven repository with a deployed stubs for the
|
||||
<code class="literal">streamService</code> application.</p><pre class="programlisting">└── .m2
|
||||
└── repository
|
||||
└── io
|
||||
@@ -259,7 +262,9 @@ Message listeners on the other side are bound to queues. Bindings connect an exc
|
||||
If message contracts are triggered the Spring AMQP stub runner integration will look for bindings on the application context that match this exchange.
|
||||
Then it collects the queues from the Spring exchanges and tries to find messages listeners bound to these queues.
|
||||
The message is triggered to all matching message listeners.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_adding_it_to_the_project_4" href="#_adding_it_to_the_project_4"></a>6.5.1 Adding it to the project</h3></div></div></div><p>It’s enough to have both Spring AMQP and Spring Cloud Contract Stub Runner on the classpath and set the property <code class="literal">stubrunner.amqp.enabled=true</code>.
|
||||
Remember to annotate your test class with <code class="literal">@AutoConfigureStubRunner</code>.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_examples_4" href="#_examples_4"></a>6.5.2 Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_stubs_structure_4" href="#_stubs_structure_4"></a>Stubs structure</h4></div></div></div><p>Let us assume that we have the following Maven repository with a deployed stubs for the
|
||||
Remember to annotate your test class with <code class="literal">@AutoConfigureStubRunner</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 already have Stream and Integration on the classpath you need
|
||||
to disable them explicitly via <code class="literal">stubrunner.stream.enabled=false</code> and <code class="literal">stubrunner.integration.enabled=false</code>
|
||||
properties</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_examples_4" href="#_examples_4"></a>6.5.2 Examples</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_stubs_structure_4" href="#_stubs_structure_4"></a>Stubs structure</h4></div></div></div><p>Let us assume that we have the following Maven repository with a deployed stubs for the
|
||||
<code class="literal">spring-cloud-contract-amqp-test</code> application.</p><pre class="programlisting">└── .m2
|
||||
└── repository
|
||||
└── com
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -340,388 +340,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied.
|
||||
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.</p><a class="externalLink" href="https://www.apache.org/licenses/LICENSE-2.0">[Original text]</a>
|
||||
<p>Copy of the license follows:</p>
|
||||
<!-- Navigation -->
|
||||
<header>
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#mainnav-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="https://www.apache.org/licenses/#" class="navbar-brand"><span class="glyphicon glyphicon-home"></span></a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="mainnav-collapse">
|
||||
<div style="line-height:20px; padding-top:5px; float:left"><a href="https://www.apache.org/">Home</a> » <a href="https://www.apache.org/licenses/">Licenses</a></div>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="https://www.apache.org/licenses/#" class="dropdown-toggle" data-toggle="dropdown">About <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="https://www.apache.org/foundation">Overview</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/members.html">Members</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/how-it-works.html">Process</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/glossary.html">Glossary</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/preFAQ.html">FAQ</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/conduct.html">Code of Conduct</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contact.html ">Contact</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://www.apache.org/index.html#projects-list">Projects</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="https://www.apache.org/licenses/#" class="dropdown-toggle" data-toggle="dropdown">People <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="http://people.apache.org/">Overview</a></li>
|
||||
<li><a href="http://people.apache.org/committer-index.html">Committers</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/how-it-works.html#meritocracy">Meritocracy</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/how-it-works.html#roles">Roles</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/conduct.html">Code of Conduct</a></li>
|
||||
<li><a href="http://planet.apache.org/">Planet Apache</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="https://www.apache.org/licenses/#" class="dropdown-toggle" data-toggle="dropdown">Get Involved <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="https://www.apache.org/foundation/getinvolved.html">Overview</a></li>
|
||||
<li><a href="http://community.apache.org/">Community Development</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/conduct.html">Code of Conduct</a></li>
|
||||
<li><a href="http://helpwanted.apache.org/">Help Wanted</a></li>
|
||||
<li><a href="http://www.apachecon.com/">ApacheCon</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://www.apache.org/dyn/closer.cgi">Download</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="https://www.apache.org/licenses/#" class="dropdown-toggle" data-toggle="dropdown">Support Apache <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contributing.html">Donations</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- / Navigation -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-5 col-xs-12">
|
||||
<img src="https://www.apache.org/img/asf_logo.png" alt="Apache Logo" style="max-width: 100%;">
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3 col-xs-6">
|
||||
<a href="http://apache.org/foundation/contributing.html" title="Support Apache">
|
||||
<img src="https://www.apache.org/images/SupportApache-small.png" style="height: 150px; width: 150px; margin-top: 5px; margin-bottom: 5px;">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-4 col-xs-6">
|
||||
<div class="input-group" style="margin-bottom: 5px;">
|
||||
<script>
|
||||
(function() {
|
||||
var cx = '005703438322411770421:5mgshgrgx2u';
|
||||
var gcse = document.createElement('script');
|
||||
gcse.type = 'text/javascript';
|
||||
gcse.async = true;
|
||||
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
|
||||
'//cse.google.com/cse.js?cx=' + cx;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(gcse, s);
|
||||
})();
|
||||
</script>
|
||||
<gcse:searchbox-only></gcse:searchbox-only>
|
||||
</div>
|
||||
<a role="button" class="btn btn-block btn-default btn-xs" href="https://www.apache.org/foundation/governance/">The Apache Way</a>
|
||||
<a role="button" class="btn btn-block btn-default btn-xs" href="https://community.apache.org/contributors/">Contribute</a>
|
||||
<a role="button" class="btn btn-block btn-default btn-xs" href="https://www.apache.org/foundation/thanks.html">ASF Sponsors</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container"><style type="text/css">
|
||||
/* The following code is added by mdx_elementid.py
|
||||
It was originally lifted from http://subversion.apache.org/style/site.css */
|
||||
/*
|
||||
* Hide class="elementid-permalink", except when an enclosing heading
|
||||
* has the :hover property.
|
||||
*/
|
||||
.headerlink, .elementid-permalink {
|
||||
visibility: hidden;
|
||||
}
|
||||
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
|
||||
<p>Apache License<br></br>Version 2.0, January 2004<br></br>
|
||||
<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
|
||||
<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
|
||||
<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
|
||||
<p>"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.</p>
|
||||
<p>"Licensor" shall mean the copyright owner or entity authorized by the
|
||||
copyright owner that is granting the License.</p>
|
||||
<p>"Legal Entity" shall mean the union of the acting entity and all other
|
||||
entities that control, are controlled by, or are under common control with
|
||||
that entity. For the purposes of this definition, "control" means (i) the
|
||||
power, direct or indirect, to cause the direction or management of such
|
||||
entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial
|
||||
ownership of such entity.</p>
|
||||
<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.</p>
|
||||
<p>"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation source,
|
||||
and configuration files.</p>
|
||||
<p>"Object" form shall mean any form resulting from mechanical transformation
|
||||
or translation of a Source form, including but not limited to compiled
|
||||
object code, generated documentation, and conversions to other media types.</p>
|
||||
<p>"Work" shall mean the work of authorship, whether in Source or Object form,
|
||||
made available under the License, as indicated by a copyright notice that
|
||||
is included in or attached to the work (an example is provided in the
|
||||
Appendix below).</p>
|
||||
<p>"Derivative Works" shall mean any work, whether in Source or Object form,
|
||||
that is based on (or derived from) the Work and for which the editorial
|
||||
revisions, annotations, elaborations, or other modifications represent, as
|
||||
a whole, an original work of authorship. For the purposes of this License,
|
||||
Derivative Works shall not include works that remain separable from, or
|
||||
merely link (or bind by name) to the interfaces of, the Work and Derivative
|
||||
Works thereof.</p>
|
||||
<p>"Contribution" shall mean any work of authorship, including the original
|
||||
version of the Work and any modifications or additions to that Work or
|
||||
Derivative Works thereof, that is intentionally submitted to Licensor for
|
||||
inclusion in the Work by the copyright owner or by an individual or Legal
|
||||
Entity authorized to submit on behalf of the copyright owner. For the
|
||||
purposes of this definition, "submitted" means any form of electronic,
|
||||
verbal, or written communication sent to the Licensor or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that
|
||||
are managed by, or on behalf of, the Licensor for the purpose of discussing
|
||||
and improving the Work, but excluding communication that is conspicuously
|
||||
marked or otherwise designated in writing by the copyright owner as "Not a
|
||||
Contribution."</p>
|
||||
<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
|
||||
behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.</p>
|
||||
<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
|
||||
terms and conditions of this License, each Contributor hereby grants to You
|
||||
a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of, publicly
|
||||
display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.</p>
|
||||
<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
|
||||
and conditions of this License, each Contributor hereby grants to You a
|
||||
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made, use,
|
||||
offer to sell, sell, import, and otherwise transfer the Work, where such
|
||||
license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by
|
||||
combination of their Contribution(s) with the Work to which such
|
||||
Contribution(s) was submitted. If You institute patent litigation against
|
||||
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
||||
that the Work or a Contribution incorporated within the Work constitutes
|
||||
direct or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate as of the
|
||||
date such litigation is filed.</p>
|
||||
<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
|
||||
distribute copies of the Work or Derivative Works thereof in any medium,
|
||||
with or without modifications, and in Source or Object form, provided that
|
||||
You meet the following conditions:</p>
|
||||
<ol style="list-style: lower-latin;">
|
||||
<li>You must give any other recipients of the Work or Derivative Works a
|
||||
copy of this License; and</li>
|
||||
|
||||
<li>You must cause any modified files to carry prominent notices stating
|
||||
that You changed the files; and</li>
|
||||
|
||||
<li>You must retain, in the Source form of any Derivative Works that You
|
||||
distribute, all copyright, patent, trademark, and attribution notices from
|
||||
the Source form of the Work, excluding those notices that do not pertain to
|
||||
any part of the Derivative Works; and</li>
|
||||
|
||||
<li>If the Work includes a "NOTICE" text file as part of its distribution,
|
||||
then any Derivative Works that You distribute must include a readable copy
|
||||
of the attribution notices contained within such NOTICE file, excluding
|
||||
those notices that do not pertain to any part of the Derivative Works, in
|
||||
at least one of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or documentation,
|
||||
if provided along with the Derivative Works; or, within a display generated
|
||||
by the Derivative Works, if and wherever such third-party notices normally
|
||||
appear. The contents of the NOTICE file are for informational purposes only
|
||||
and do not modify the License. You may add Your own attribution notices
|
||||
within Derivative Works that You distribute, alongside or as an addendum to
|
||||
the NOTICE text from the Work, provided that such additional attribution
|
||||
notices cannot be construed as modifying the License.
|
||||
<br/>
|
||||
<br/>
|
||||
You may add Your own copyright statement to Your modifications and may
|
||||
provide additional or different license terms and conditions for use,
|
||||
reproduction, or distribution of Your modifications, or for any such
|
||||
Derivative Works as a whole, provided Your use, reproduction, and
|
||||
distribution of the Work otherwise complies with the conditions stated in
|
||||
this License.
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
|
||||
explicitly state otherwise, any Contribution intentionally submitted for
|
||||
inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the
|
||||
terms of any separate license agreement you may have executed with Licensor
|
||||
regarding such Contributions.</p>
|
||||
<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
|
||||
permission to use the trade names, trademarks, service marks, or product
|
||||
names of the Licensor, except as required for reasonable and customary use
|
||||
in describing the origin of the Work and reproducing the content of the
|
||||
NOTICE file.</p>
|
||||
<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
|
||||
applicable law or agreed to in writing, Licensor provides the Work (and
|
||||
each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
|
||||
without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
|
||||
are solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise
|
||||
of permissions under this License.</p>
|
||||
<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
|
||||
under no legal theory, whether in tort (including negligence), contract, or
|
||||
otherwise, unless required by applicable law (such as deliberate and
|
||||
grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a result
|
||||
of this License or out of the use or inability to use the Work (including
|
||||
but not limited to damages for loss of goodwill, work stoppage, computer
|
||||
failure or malfunction, or any and all other commercial damages or losses),
|
||||
even if such Contributor has been advised of the possibility of such
|
||||
damages.</p>
|
||||
<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
|
||||
While redistributing the Work or Derivative Works thereof, You may choose
|
||||
to offer, and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this License.
|
||||
However, in accepting such obligations, You may act only on Your own behalf
|
||||
and on Your sole responsibility, not on behalf of any other Contributor,
|
||||
and only if You agree to indemnify, defend, and hold each Contributor
|
||||
harmless for any liability incurred by, or claims asserted against, such
|
||||
Contributor by reason of your accepting any such warranty or additional
|
||||
liability.</p>
|
||||
<p>END OF TERMS AND CONDITIONS</p>
|
||||
<h1 id="apply">APPENDIX: How to apply the Apache License to your work<a class="headerlink" href="https://www.apache.org/licenses/#apply" title="Permanent link">¶</a></h1>
|
||||
<p>To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included
|
||||
on the same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.</p>
|
||||
<div class="codehilite"><pre>Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
</pre></div></div>
|
||||
|
||||
<!-- Footer -->
|
||||
|
||||
<footer class="bg-primary">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<br />
|
||||
<div class="col-sm-1">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Community</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="http://community.apache.org/">Overview</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/conferences.html">Conferences</a></li>
|
||||
<li><a href="http://community.apache.org/gsoc.html">Summer of Code</a></li>
|
||||
<li><a href="http://community.apache.org/newcomers/">Getting Started</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/how-it-works.html">The Apache Way</a></li>
|
||||
<li><a href="https://www.apache.org/travel/">Travel Assistance</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/getinvolved.html">Get Involved</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/conduct.html">Code of Conduct</a></li>
|
||||
<li><a href="http://community.apache.org/newbiefaq.html">Community FAQ</a></li>
|
||||
<li><a href="https://www.apache.org/memorials/">Memorials</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Innovation</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="http://incubator.apache.org/">Incubator</a></li>
|
||||
<li><a href="http://labs.apache.org/">Labs</a></li>
|
||||
<li><a href="https://www.apache.org/licenses/">Licensing</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/license-faq.html">Licensing FAQ</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/marks/">Trademark Policy</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contact.html">Contacts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Tech Operations</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="https://www.apache.org/dev/">Developer Information</a></li>
|
||||
<li><a href="https://www.apache.org/dev/infrastructure.html">Infrastructure</a></li>
|
||||
<li><a href="https://www.apache.org/security/">Security</a></li>
|
||||
<li><a href="http://status.apache.org">Status</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contact.html">Contacts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Press</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="https://www.apache.org/press/">Overview</a></li>
|
||||
<li><a href="https://blogs.apache.org/">ASF News</a></li>
|
||||
<li><a href="https://blogs.apache.org/foundation/">Announcements</a></li>
|
||||
<li><a href="https://twitter.com/TheASF">Twitter Feed</a></li>
|
||||
<li><a href="https://www.apache.org/press/#contact">Contacts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<h5 class="white">Legal</h5>
|
||||
<ul class="list-unstyled white" role="menu">
|
||||
<li><a href="https://www.apache.org/legal/">Legal Affairs</a></li>
|
||||
<li><a href="https://www.apache.org/licenses/">Licenses</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/marks/">Trademark Policy</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/records/">Public Records</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/policies/privacy.html">Privacy Policy</a></li>
|
||||
<li><a href="https://www.apache.org/licenses/exports/">Export Information</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/license-faq.html">License/Distribution FAQ</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/contact.html">Contacts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr class="col-lg-12 hr-white" />
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<p class="text-center">Copyright © 2017 The Apache Software Foundation, Licensed under the <a class="white" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
|
||||
<p class="text-center">Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
<!-- / Footer -->
|
||||
|
||||
<script src="/js/jquery-2.1.1.min.js"></script>
|
||||
<script src="/js/bootstrap.js"></script>
|
||||
</div></div>
|
||||
limitations under the License.</p>
|
||||
<p>Can't read the url [https://www.apache.org/licenses/LICENSE-2.0] : connect timed out</p></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3011,6 +3011,12 @@ segments are padded with trailing 0 or "ga" segments, respectively, until the ki
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<simpara>It also provides points of entry to integrate with any other solution on the market.</simpara>
|
||||
<important>
|
||||
<simpara>If you have multiple frameworks on the classpath Stub Runner will need to
|
||||
define which one should be used. Let’s assume that you have both AMQP, Spring Cloud Stream and Spring Integration
|
||||
on the classpath. Then you need to set <literal>stubrunner.stream.enabled=false</literal> and <literal>stubrunner.integration.enabled=false</literal>.
|
||||
That way the only remaining framework is Spring AMQP.</simpara>
|
||||
</important>
|
||||
<section xml:id="_stub_triggering">
|
||||
<title>Stub triggering</title>
|
||||
<simpara>To trigger a message it’s enough to use the <literal>StubTrigger</literal> interface:</simpara>
|
||||
@@ -3084,6 +3090,10 @@ routes.</simpara>
|
||||
<simpara>It’s enough to have both Apache Camel and Spring Cloud Contract Stub Runner on classpath.
|
||||
Remember to annotate your test class with <literal>@AutoConfigureStubRunner</literal>.</simpara>
|
||||
</section>
|
||||
<section xml:id="_disabling_the_functionality">
|
||||
<title>Disabling the functionality</title>
|
||||
<simpara>If you need to disable this functionality just pass <literal>stubrunner.camel.enabled=false</literal> property.</simpara>
|
||||
</section>
|
||||
<section xml:id="_examples">
|
||||
<title>Examples</title>
|
||||
<section xml:id="_stubs_structure">
|
||||
@@ -3187,6 +3197,10 @@ routes.</simpara>
|
||||
<simpara>It’s enough to have both Spring Integration and Spring Cloud Contract Stub Runner on classpath.
|
||||
Remember to annotate your test class with <literal>@AutoConfigureStubRunner</literal>.</simpara>
|
||||
</section>
|
||||
<section xml:id="_disabling_the_functionality_2">
|
||||
<title>Disabling the functionality</title>
|
||||
<simpara>If you need to disable this functionality just pass <literal>stubrunner.integration.enabled=false</literal> property.</simpara>
|
||||
</section>
|
||||
<section xml:id="_examples_2">
|
||||
<title>Examples</title>
|
||||
<section xml:id="_stubs_structure_2">
|
||||
@@ -3335,6 +3349,10 @@ channel name.</simpara>
|
||||
<simpara>It’s enough to have both Spring Cloud Stream and Spring Cloud Contract Stub Runner on classpath.
|
||||
Remember to annotate your test class with <literal>@AutoConfigureStubRunner</literal>.</simpara>
|
||||
</section>
|
||||
<section xml:id="_disabling_the_functionality_3">
|
||||
<title>Disabling the functionality</title>
|
||||
<simpara>If you need to disable this functionality just pass <literal>stubrunner.stream.enabled=false</literal> property.</simpara>
|
||||
</section>
|
||||
<section xml:id="_examples_3">
|
||||
<title>Examples</title>
|
||||
<section xml:id="_stubs_structure_3">
|
||||
@@ -3455,6 +3473,11 @@ The message is triggered to all matching message listeners.</simpara>
|
||||
<title>Adding it to the project</title>
|
||||
<simpara>It’s enough to have both Spring AMQP and Spring Cloud Contract Stub Runner on the classpath and set the property <literal>stubrunner.amqp.enabled=true</literal>.
|
||||
Remember to annotate your test class with <literal>@AutoConfigureStubRunner</literal>.</simpara>
|
||||
<important>
|
||||
<simpara>If you already have Stream and Integration on the classpath you need
|
||||
to disable them explicitly via <literal>stubrunner.stream.enabled=false</literal> and <literal>stubrunner.integration.enabled=false</literal>
|
||||
properties</simpara>
|
||||
</important>
|
||||
</section>
|
||||
<section xml:id="_examples_4">
|
||||
<title>Examples</title>
|
||||
|
||||
Reference in New Issue
Block a user