From 0dc31de49f731b39ee92e9c563b41912c9dcb3d7 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 13 Nov 2017 10:09:27 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- ...ulti__spring_cloud_contract_stub_runner.html | 17 ++--------------- single/spring-cloud-contract.html | 17 ++--------------- spring-cloud-contract.xml | 17 ++--------------- 3 files changed, 6 insertions(+), 45 deletions(-) diff --git a/multi/multi__spring_cloud_contract_stub_runner.html b/multi/multi__spring_cloud_contract_stub_runner.html index d9b5d5ee77..3fb5ebbe80 100644 --- a/multi/multi__spring_cloud_contract_stub_runner.html +++ b/multi/multi__spring_cloud_contract_stub_runner.html @@ -458,15 +458,7 @@ its methods as presented below:

@AutoConfigureStubRunner.
+    - org.springframework.cloud.contract.verifier.stubs:bootService

Instead of using the properties you can also use the properties inside the @AutoConfigureStubRunner. Below you can find an example of achieving the same result by setting values on the annotation.

@AutoConfigureStubRunner(
 		ids = ["org.springframework.cloud.contract.verifier.stubs:loanIssuance",
 		"org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer",
@@ -482,12 +474,7 @@ or DiscoveryClient directly, to call those stubbed
 	and: 'Stubs can be reached via load service discovery'
 		restTemplate.getForObject('http://loanIssuance/name', String) == 'loanIssuance'
 		restTemplate.getForObject('http://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer'
-}

for the following configuration file

spring.cloud:
-  zookeeper.enabled: false
-  consul.enabled: false
-eureka.client.enabled: false
-stubrunner:
-  camel.enabled: false
+}

for the following configuration file

stubrunner:
   idsToServiceIds:
     ivyNotation: someValueInsideYourCode
     fraudDetectionServer: someNameThatShouldMapFraudDetectionServer

Test profiles and service discovery

In your integration tests you typically don’t want to call neither a discovery service (e.g. Eureka) diff --git a/single/spring-cloud-contract.html b/single/spring-cloud-contract.html index 2f311ef685..0d4cd31f88 100644 --- a/single/spring-cloud-contract.html +++ b/single/spring-cloud-contract.html @@ -1987,15 +1987,7 @@ its methods as presented below:

@AutoConfigureStubRunner.
+    - org.springframework.cloud.contract.verifier.stubs:bootService

Instead of using the properties you can also use the properties inside the @AutoConfigureStubRunner. Below you can find an example of achieving the same result by setting values on the annotation.

@AutoConfigureStubRunner(
 		ids = ["org.springframework.cloud.contract.verifier.stubs:loanIssuance",
 		"org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer",
@@ -2011,12 +2003,7 @@ or DiscoveryClient directly, to call those stubbed
 	and: 'Stubs can be reached via load service discovery'
 		restTemplate.getForObject('http://loanIssuance/name', String) == 'loanIssuance'
 		restTemplate.getForObject('http://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer'
-}

for the following configuration file

spring.cloud:
-  zookeeper.enabled: false
-  consul.enabled: false
-eureka.client.enabled: false
-stubrunner:
-  camel.enabled: false
+}

for the following configuration file

stubrunner:
   idsToServiceIds:
     ivyNotation: someValueInsideYourCode
     fraudDetectionServer: someNameThatShouldMapFraudDetectionServer

Test profiles and service discovery

In your integration tests you typically don’t want to call neither a discovery service (e.g. Eureka) diff --git a/spring-cloud-contract.xml b/spring-cloud-contract.xml index 26a2bedc25..834dcbb522 100644 --- a/spring-cloud-contract.xml +++ b/spring-cloud-contract.xml @@ -3283,15 +3283,7 @@ class StubRunnerConfigurationSpec extends Specification { ids: - org.springframework.cloud.contract.verifier.stubs:loanIssuance - org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer - - org.springframework.cloud.contract.verifier.stubs:bootService - cloud: - enabled: false - camel: - enabled: false - -spring.cloud: - consul.enabled: false - service-registry.enabled: false + - org.springframework.cloud.contract.verifier.stubs:bootService Instead of using the properties you can also use the properties inside the @AutoConfigureStubRunner. Below you can find an example of achieving the same result by setting values on the annotation. @AutoConfigureStubRunner( @@ -3349,12 +3341,7 @@ or DiscoveryClient directly, to call those stubbed servers in restTemplate.getForObject('http://someNameThatShouldMapFraudDetectionServer/name', String) == 'fraudDetectionServer' } for the following configuration file -spring.cloud: - zookeeper.enabled: false - consul.enabled: false -eureka.client.enabled: false -stubrunner: - camel.enabled: false +stubrunner: idsToServiceIds: ivyNotation: someValueInsideYourCode fraudDetectionServer: someNameThatShouldMapFraudDetectionServer