From 0dc31de49f731b39ee92e9c563b41912c9dcb3d7 Mon Sep 17 00:00:00 2001
From: buildmaster
@AutoConfigureStubRunner.
+ - org.springframework.cloud.contract.verifier.stubs:bootServiceInstead 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: someNameThatShouldMapFraudDetectionServerIn 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:bootServiceInstead 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: someNameThatShouldMapFraudDetectionServerIn 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