This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * http://foo.bar (UnknownHostException) with 1 occurrences migrated to: https://foo.bar ([https](https://foo.bar) result UnknownHostException). * http://repo.spring.io/plugins-staging-local/ (404) with 2 occurrences migrated to: https://repo.spring.io/plugins-staging-local/ ([https](https://repo.spring.io/plugins-staging-local/) result 404). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://maven.apache.org/xsd/maven-4.0.0.xsd with 78 occurrences migrated to: https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200). * http://repo.spring.io/libs-staging-local/ with 1 occurrences migrated to: https://repo.spring.io/libs-staging-local/ ([https](https://repo.spring.io/libs-staging-local/) result 200). * http://solidsoft.wordpress.com/2014/11/13/gradle-tricks-display-dependencies-for-all-subprojects-in-multi-project-build/ with 1 occurrences migrated to: https://solidsoft.wordpress.com/2014/11/13/gradle-tricks-display-dependencies-for-all-subprojects-in-multi-project-build/ ([https](https://solidsoft.wordpress.com/2014/11/13/gradle-tricks-display-dependencies-for-all-subprojects-in-multi-project-build/) result 200). * http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch with 1 occurrences migrated to: https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch ([https](https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch) result 200). * http://stackoverflow.com/questions/20618857/gradle-task-groovydoc-failing-with-noclassdeffounderror with 1 occurrences migrated to: https://stackoverflow.com/questions/20618857/gradle-task-groovydoc-failing-with-noclassdeffounderror ([https](https://stackoverflow.com/questions/20618857/gradle-task-groovydoc-failing-with-noclassdeffounderror) result 200). * http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin with 1 occurrences migrated to: https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin ([https](https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin) result 200). * http://www.apache.org/licenses/LICENSE-2.0 with 66 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). * http://www.apache.org/licenses/LICENSE-2.0.txt with 1 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200). * http://repo.spring.io/libs-release-local with 1 occurrences migrated to: https://repo.spring.io/libs-release-local ([https](https://repo.spring.io/libs-release-local) result 302). * http://repo.spring.io/milestone with 35 occurrences migrated to: https://repo.spring.io/milestone ([https](https://repo.spring.io/milestone) result 302). * http://repo.spring.io/plugins-release-local with 2 occurrences migrated to: https://repo.spring.io/plugins-release-local ([https](https://repo.spring.io/plugins-release-local) result 302). * http://repo.spring.io/plugins-snapshot with 2 occurrences migrated to: https://repo.spring.io/plugins-snapshot ([https](https://repo.spring.io/plugins-snapshot) result 302). * http://repo.spring.io/release with 34 occurrences migrated to: https://repo.spring.io/release ([https](https://repo.spring.io/release) result 302). * http://repo.spring.io/snapshot with 35 occurrences migrated to: https://repo.spring.io/snapshot ([https](https://repo.spring.io/snapshot) result 302). # Ignored These URLs were intentionally ignored. * http://localhost:8081/artifactory/libs-release-local with 2 occurrences * http://maven.apache.org/POM/4.0.0 with 156 occurrences * http://www.w3.org/2001/XMLSchema-instance with 78 occurrences
=== Stub Runner Stream
Spring Cloud Contract Verifier Stub Runner's messaging module gives you an easy way to
integrate with Spring Stream. For the provided artifacts, it automatically downloads the
stubs and registers the required routes.
WARNING: If Stub Runner's integration with Stream the `messageFrom` or `sentTo` Strings
are resolved first as a `destination` of a channel and no such `destination` exists, the
destination is resolved as a channel name.
IMPORTANT: If you want to use Spring Cloud Stream remember, to add a dependency on
`org.springframework.cloud:spring-cloud-stream-test-support`.
[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
.Maven
----
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-test-support</artifactId>
<scope>test</scope>
</dependency>
----
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
.Gradle
----
testCompile "org.springframework.cloud:spring-cloud-stream-test-support"
----
==== Adding the Runner to the Project
You can have both Spring Cloud Stream and Spring Cloud Contract Stub Runner on the
classpath. Remember to annotate your test class with `@AutoConfigureStubRunner`.
==== Disabling the functionality
If you need to disable this functionality, set the `stubrunner.stream.enabled=false`
property.
Assume that you have the following Maven repository with a deployed stubs for the
`streamService` application:
[source,bash,indent=0]
----
└── .m2
└── repository
└── io
└── codearte
└── accurest
└── stubs
└── streamService
├── 0.0.1-SNAPSHOT
│ ├── streamService-0.0.1-SNAPSHOT.pom
│ ├── streamService-0.0.1-SNAPSHOT-stubs.jar
│ └── maven-metadata-local.xml
└── maven-metadata-local.xml
----
Further assume the stubs contain the following structure:
[source,bash,indent=0]
----
├── META-INF
│ └── MANIFEST.MF
└── repository
├── accurest
│ ├── bookDeleted.groovy
│ ├── bookReturned1.groovy
│ └── bookReturned2.groovy
└── mappings
----
Consider the following contracts (numbered *1*):
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=sample_dsl,indent=0]
----
Now consider *2*:
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=sample_dsl_2,indent=0]
----
Now consider the following Spring configuration:
[source,yaml]
----
include::src/test/resources/application.yml[]
----
These examples lend themselves to three scenarios:
* <<stream-scenario-1>>
* <<stream-scenario-2>>
* <<stream-scenario-3>>
[[stream-scenario-1]]
===== Scenario 1 (no input message)
To trigger a message via the `return_book_1` label, use the `StubTrigger` interface as
follows:
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=client_trigger,indent=0]
----
To listen to the output of the message sent to a channel whose `destination` is
`returnBook`:
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=client_trigger_receive,indent=0]
----
The received message passes the following assertions:
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=client_trigger_message,indent=0]
----
[[stream-scenario-2]]
===== Scenario 2 (output triggered by input)
Since the route is set for you, you can send a message to the `bookStorage`
`destination`:
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=client_send,indent=0]
----
To listen to the output of the message sent to `returnBook`:
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=client_receive,indent=0]
----
The received message passes the following assertions:
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=client_receive_message,indent=0]
----
[[stream-scenario-3]]
===== Scenario 3 (input with no output)
Since the route is set for you, you can send a message to the `{output_name}`
destination:
[source,groovy]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/messaging/stream/StreamStubRunnerSpec.groovy[tags=trigger_no_output,indent=0]
----