diff --git a/multi/multi__spring_cloud_contract_verifier_introduction.html b/multi/multi__spring_cloud_contract_verifier_introduction.html index 6d186c2c50..7e65d06d49 100644 --- a/multi/multi__spring_cloud_contract_verifier_introduction.html +++ b/multi/multi__spring_cloud_contract_verifier_introduction.html @@ -9,14 +9,14 @@ produced by Spring Cloud Contract Verifier.
Assume that we have a system consisting of multiple microservices:

If we wanted to test the application in top left corner to determine whether it can +Spring Cloud Contract Verifier.
Assume that we have a system consisting of multiple microservices:

If we wanted to test the application in top left corner to determine whether it can communicate with other services, we could do one of two things:
Both have their advantages but also a lot of disadvantages.
Deploy all microservices and perform end to end tests
Advantages:
Disadvantages:
Mock other microservices in unit/integration tests
Advantages:
Disadvantages:
To solve the aforementioned issues, Spring Cloud Contract Verifier with Stub Runner was created. The main idea is to give you very fast feedback, without the need to set up the whole world of microservices. If you work on stubs, then the only applications you need -are those that your application directly uses.

Spring Cloud Contract Verifier gives you the certainty that the stubs that you use were +are those that your application directly uses.

Spring Cloud Contract Verifier gives you the certainty that the stubs that you use were created by the service that you’re calling. Also, if you can use them, it means that they were tested against the producer’s side. In short, you can trust those stubs.
The main purposes of Spring Cloud Contract Verifier with Stub Runner are:
As sprint, we must develop a new feature: if a client wants to borrow too much money, then we mark the client as a fraud.
Technical remark - Fraud Detection has an artifact-id of http-server, while Loan
Issuance has an artifact-id of http-client, and both have a group-id of com.example.
Social remark - both client and server development teams need to communicate directly and -discuss changes while going through the process. CDC is all about communication.
The server -side code is available here and the +discuss changes while going through the process. CDC is all about communication.
The server +side code is available here and the client code here.
![]() | Tip |
|---|---|
In this case, the producer owns the contracts. Physically, all the contract are in the producer’s repository. |
If using the SNAPSHOT / Milestone / Release Candidate versions please add the following section to your build:
Maven. @@ -440,7 +440,9 @@ git merge --no-ff contract-change-pr
Work o
where the repository with your stubs is located. At this moment the stubs of the server
side are automatically downloaded from Nexus/Artifactory. You can switch off the value of
the workOffline parameter in your annotation. The following code shows an example of
-achieving the same thing by changing the properties.
Unresolved directive in verifier_introduction.adoc - include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-contract/2.0.x/samples/standalone/dsl/http-client/src/test/resources/application-test-repo.yaml[]
That’s it!
The best way to add dependencies is to use the proper starter dependency.
For stub-runner, use spring-cloud-starter-stub-runner. When you use a plugin, add
+achieving the same thing by changing the properties.
stubrunner: + ids: 'com.example:http-server-dsl:+:stubs:8080' + repositoryRoot: http://repo.spring.io/libs-snapshot
That’s it!
The best way to add dependencies is to use the proper starter dependency.
For stub-runner, use spring-cloud-starter-stub-runner. When you use a plugin, add
spring-cloud-starter-contract-verifier.
Here are some resources related to Spring Cloud Contract Verifier and Stub Runner. Note that some may be outdated, because the Spring Cloud Contract Verifier project is under constant development.
You can check out the video from the Warsaw JUG about Spring Cloud Contract:
You can find some samples at diff --git a/multi/multi__spring_cloud_contract_verifier_setup.html b/multi/multi__spring_cloud_contract_verifier_setup.html index 36e6d97b1d..07167e4d58 100644 --- a/multi/multi__spring_cloud_contract_verifier_setup.html +++ b/multi/multi__spring_cloud_contract_verifier_setup.html @@ -455,7 +455,7 @@ goal.
For Groovy Spock code, use the following:
</testSources> </configuration> </plugin>
To ensure that provider side is compliant with defined contracts, you need to invoke
-mvn generateTest test.
If you see the following exception while using STS:

When you click on the error marker you should see something like this:
plugin:1.1.0.M1:convert:default-convert:process-test-resources) org.apache.maven.plugin.PluginExecutionException: Execution default-convert of goal org.springframework.cloud:spring-
+mvn generateTest test.If you see the following exception while using STS:

When you click on the error marker you should see something like this:
plugin:1.1.0.M1:convert:default-convert:process-test-resources) org.apache.maven.plugin.PluginExecutionException: Execution default-convert of goal org.springframework.cloud:spring- cloud-contract-maven-plugin:1.1.0.M1:convert failed. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at ... diff --git a/multi/multi__spring_cloud_contract_wiremock.html b/multi/multi__spring_cloud_contract_wiremock.html index 608a4d8d95..66c70d8d8e 100644 --- a/multi/multi__spring_cloud_contract_wiremock.html +++ b/multi/multi__spring_cloud_contract_wiremock.html @@ -2,7 +2,7 @@11. Spring Cloud Contract WireMock The Spring Cloud Contract WireMock modules let you use WireMock in a Spring Boot application. Check out the -samples +samples for more details.
If you have a Spring Boot application that uses Tomcat as an embedded server (which is the default with
-spring-boot-starter-web), you can addspring-cloud-contract-wiremockto your classpath and add@AutoConfigureWireMockin diff --git a/multi/multi_pr01.html b/multi/multi_pr01.html index 3436568f42..fcaa8115ea 100644 --- a/multi/multi_pr01.html +++ b/multi/multi_pr01.html @@ -1,4 +1,4 @@\ No newline at end of file +Documentation Authors: Adam Dudczak, Mathias Düsterhöft, Marcin Grzejszczak, Dennis Kieselhorst, Jakub Kubryński, Karol Lassak, -Olga Maciaszek-Sharma, Mariusz Smykuła, Dave Syer, Jay Bryant
2.0.0.BUILD-SNAPSHOT