From f849dc40c95fb190e0c5ee87ee89c7bd5933dc90 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 22 Jan 2020 17:20:59 -0500 Subject: [PATCH 1/6] Replaces deprecations --- .../provider/wiremock/WireMockHttpServerStubSpec.groovy | 4 ++-- .../contract/stubrunner/ContractProjectUpdaterTest.java | 4 ++-- .../contract/verifier/builder/MethodBodyBuilderSpec.groovy | 5 ++--- .../builder/MockMvcMethodBodyBuilderWithMatchersSpec.groovy | 4 ++-- .../verifier/builder/SpringTestMethodBodyBuildersSpec.groovy | 5 +++-- .../verifier/builder/XmlMethodBodyBuilderSpec.groovy | 4 ++-- .../verifier/builder/YamlMockMvcMethodBodyBuilderSpec.groovy | 5 ++--- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/wiremock/WireMockHttpServerStubSpec.groovy b/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/wiremock/WireMockHttpServerStubSpec.groovy index d767041030..029fbe5be6 100644 --- a/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/wiremock/WireMockHttpServerStubSpec.groovy +++ b/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/wiremock/WireMockHttpServerStubSpec.groovy @@ -21,7 +21,7 @@ import com.github.tomakehurst.wiremock.stubbing.StubMapping import org.junit.Rule import spock.lang.Specification -import org.springframework.boot.test.rule.OutputCapture +import org.springframework.boot.test.system.OutputCaptureRule import org.springframework.boot.test.web.client.TestRestTemplate import org.springframework.web.client.RestTemplate @@ -30,7 +30,7 @@ class WireMockHttpServerStubSpec extends Specification { final File MAPPING_DESCRIPTOR = new File('src/test/resources/transformers.json') @Rule - OutputCapture capture = new OutputCapture() + OutputCaptureRule capture = new OutputCaptureRule() def 'should describe stub mapping'() { given: diff --git a/spring-cloud-contract-stub-runner/src/test/java/org/springframework/cloud/contract/stubrunner/ContractProjectUpdaterTest.java b/spring-cloud-contract-stub-runner/src/test/java/org/springframework/cloud/contract/stubrunner/ContractProjectUpdaterTest.java index 8d2c49391e..dfc10fd527 100644 --- a/spring-cloud-contract-stub-runner/src/test/java/org/springframework/cloud/contract/stubrunner/ContractProjectUpdaterTest.java +++ b/spring-cloud-contract-stub-runner/src/test/java/org/springframework/cloud/contract/stubrunner/ContractProjectUpdaterTest.java @@ -27,7 +27,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.springframework.boot.test.rule.OutputCapture; +import org.springframework.boot.test.system.OutputCaptureRule; import org.springframework.cloud.contract.stubrunner.spring.StubRunnerProperties; import static org.assertj.core.api.BDDAssertions.then; @@ -38,7 +38,7 @@ import static org.assertj.core.api.BDDAssertions.then; public class ContractProjectUpdaterTest extends AbstractGitTest { @Rule - public OutputCapture outputCapture = new OutputCapture(); + public OutputCaptureRule outputCapture = new OutputCaptureRule(); File originalProject; diff --git a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MethodBodyBuilderSpec.groovy b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MethodBodyBuilderSpec.groovy index 7f67b9f2f3..db3c764013 100644 --- a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MethodBodyBuilderSpec.groovy +++ b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MethodBodyBuilderSpec.groovy @@ -17,13 +17,12 @@ package org.springframework.cloud.contract.verifier.builder - import org.junit.Rule import spock.lang.Issue import spock.lang.Shared import spock.lang.Specification -import org.springframework.boot.test.rule.OutputCapture +import org.springframework.boot.test.system.OutputCaptureRule import org.springframework.cloud.contract.spec.Contract import org.springframework.cloud.contract.verifier.config.ContractVerifierConfigProperties import org.springframework.cloud.contract.verifier.config.TestFramework @@ -37,7 +36,7 @@ import org.springframework.cloud.contract.verifier.util.SyntaxChecker class MethodBodyBuilderSpec extends Specification implements WireMockStubVerifier { @Rule - OutputCapture capture = new OutputCapture() + OutputCaptureRule capture = new OutputCaptureRule() @Shared ContractVerifierConfigProperties properties = new ContractVerifierConfigProperties( diff --git a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MockMvcMethodBodyBuilderWithMatchersSpec.groovy b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MockMvcMethodBodyBuilderWithMatchersSpec.groovy index d04d447ab9..8ca93b8265 100644 --- a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MockMvcMethodBodyBuilderWithMatchersSpec.groovy +++ b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/MockMvcMethodBodyBuilderWithMatchersSpec.groovy @@ -22,7 +22,7 @@ import spock.lang.Issue import spock.lang.Shared import spock.lang.Specification -import org.springframework.boot.test.rule.OutputCapture +import org.springframework.boot.test.system.OutputCaptureRule import org.springframework.cloud.contract.spec.Contract import org.springframework.cloud.contract.verifier.config.ContractVerifierConfigProperties import org.springframework.cloud.contract.verifier.config.TestFramework @@ -34,7 +34,7 @@ import org.springframework.cloud.contract.verifier.util.SyntaxChecker class MockMvcMethodBodyBuilderWithMatchersSpec extends Specification implements WireMockStubVerifier { @Rule - OutputCapture outputCapture = new OutputCapture() + OutputCaptureRule outputCapture = new OutputCaptureRule() @Shared ContractVerifierConfigProperties properties = new ContractVerifierConfigProperties( diff --git a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/SpringTestMethodBodyBuildersSpec.groovy b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/SpringTestMethodBodyBuildersSpec.groovy index bf77071910..94a003bcae 100644 --- a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/SpringTestMethodBodyBuildersSpec.groovy +++ b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/SpringTestMethodBodyBuildersSpec.groovy @@ -24,7 +24,7 @@ import spock.lang.Shared import spock.lang.Specification import spock.util.environment.RestoreSystemProperties -import org.springframework.boot.test.rule.OutputCapture +import org.springframework.boot.test.system.OutputCaptureRule import org.springframework.cloud.contract.spec.Contract import org.springframework.cloud.contract.verifier.config.ContractVerifierConfigProperties import org.springframework.cloud.contract.verifier.config.TestFramework @@ -32,6 +32,7 @@ import org.springframework.cloud.contract.verifier.config.TestMode import org.springframework.cloud.contract.verifier.dsl.wiremock.WireMockStubVerifier import org.springframework.cloud.contract.verifier.file.ContractMetadata import org.springframework.cloud.contract.verifier.util.SyntaxChecker + /** * @author Jakub Kubrynski, codearte.io * @author Tim Ysewyn @@ -39,7 +40,7 @@ import org.springframework.cloud.contract.verifier.util.SyntaxChecker class SpringTestMethodBodyBuildersSpec extends Specification implements WireMockStubVerifier { @Rule - OutputCapture capture = new OutputCapture() + OutputCaptureRule capture = new OutputCaptureRule() @Shared ContractVerifierConfigProperties properties = new ContractVerifierConfigProperties( diff --git a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/XmlMethodBodyBuilderSpec.groovy b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/XmlMethodBodyBuilderSpec.groovy index bfb46cfc0f..73f9d83874 100644 --- a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/XmlMethodBodyBuilderSpec.groovy +++ b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/XmlMethodBodyBuilderSpec.groovy @@ -21,7 +21,7 @@ import spock.lang.Shared import spock.lang.Specification import spock.lang.Unroll -import org.springframework.boot.test.rule.OutputCapture +import org.springframework.boot.test.system.OutputCaptureRule import org.springframework.cloud.contract.spec.Contract import org.springframework.cloud.contract.verifier.config.ContractVerifierConfigProperties import org.springframework.cloud.contract.verifier.config.TestFramework @@ -36,7 +36,7 @@ import org.springframework.cloud.contract.verifier.util.SyntaxChecker class XmlMethodBodyBuilderSpec extends Specification { @Rule - OutputCapture capture = new OutputCapture() + OutputCaptureRule capture = new OutputCaptureRule() @Shared ContractVerifierConfigProperties properties = new ContractVerifierConfigProperties( diff --git a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/YamlMockMvcMethodBodyBuilderSpec.groovy b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/YamlMockMvcMethodBodyBuilderSpec.groovy index dde39d47c8..dea3f29f5a 100644 --- a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/YamlMockMvcMethodBodyBuilderSpec.groovy +++ b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/builder/YamlMockMvcMethodBodyBuilderSpec.groovy @@ -16,14 +16,13 @@ package org.springframework.cloud.contract.verifier.builder - import org.junit.Rule import spock.lang.Issue import spock.lang.Shared import spock.lang.Specification import spock.util.environment.RestoreSystemProperties -import org.springframework.boot.test.rule.OutputCapture +import org.springframework.boot.test.system.OutputCaptureRule import org.springframework.cloud.contract.spec.Contract import org.springframework.cloud.contract.verifier.config.ContractVerifierConfigProperties import org.springframework.cloud.contract.verifier.config.TestFramework @@ -40,7 +39,7 @@ import org.springframework.cloud.contract.verifier.util.SyntaxChecker class YamlMockMvcMethodBodyBuilderSpec extends Specification implements WireMockStubVerifier { @Rule - OutputCapture capture = new OutputCapture() + OutputCaptureRule capture = new OutputCaptureRule() @Shared ContractVerifierConfigProperties properties = new ContractVerifierConfigProperties( From d6098bbf2daa847857619eca59c217ce2c2278de Mon Sep 17 00:00:00 2001 From: abialas Date: Fri, 24 Jan 2020 09:49:15 +0100 Subject: [PATCH 2/6] Fix StackOverflow exception when stubTrigger runs contract with body based on json file (#1311) * Fix StackOverflow exception when stubTrigger runs contract with body based on json file * Add test for extracting body value from json file * Extract value from file to map only in case file content is String --- .../verifier/util/BodyExtractor.groovy | 4 ++++ .../verifier/util/BodyExtractorSpec.groovy | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/util/BodyExtractorSpec.groovy diff --git a/spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/BodyExtractor.groovy b/spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/BodyExtractor.groovy index ed3ec98907..619007006e 100644 --- a/spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/BodyExtractor.groovy +++ b/spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/BodyExtractor.groovy @@ -24,6 +24,7 @@ import groovy.transform.CompileStatic import org.springframework.cloud.contract.spec.internal.CanBeDynamic import org.springframework.cloud.contract.spec.internal.DslProperty +import org.springframework.cloud.contract.spec.internal.FromFileProperty import org.springframework.cloud.contract.spec.internal.RegexProperty import static ContentUtils.extractValue @@ -89,6 +90,9 @@ class BodyExtractor { else if (bodyValue instanceof DslProperty) { return extractClientValueFromBody(bodyValue.clientValue) } + else if (bodyValue instanceof FromFileProperty && bodyValue.isString()) { + return MapConverter.transformValues(bodyValue.asString(), Closure.IDENTITY) + } else { return MapConverter.transformValues(bodyValue, { Object prop = it instanceof DslProperty ? it.clientValue : it diff --git a/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/util/BodyExtractorSpec.groovy b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/util/BodyExtractorSpec.groovy new file mode 100644 index 0000000000..ae321b3038 --- /dev/null +++ b/spring-cloud-contract-verifier/src/test/groovy/org/springframework/cloud/contract/verifier/util/BodyExtractorSpec.groovy @@ -0,0 +1,19 @@ +package org.springframework.cloud.contract.verifier.util + +import org.springframework.cloud.contract.spec.internal.FromFileProperty +import spock.lang.Specification + +/** + * @author Adam BiaƂas + */ +class BodyExtractorSpec extends Specification { + + def "should extract body from json file"() { + given: + def uri = BodyExtractorSpec.getResource("/classpath/response.json").toURI() + def jsonFromFile = new FromFileProperty(new File(uri), String.class) + expect: + ["status" : "RESPONSE"] == BodyExtractor.extractClientValueFromBody(jsonFromFile) + } + +} From de9d0c517f6d10eb584774c601842d32d154d03c Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Fri, 24 Jan 2020 12:01:16 +0100 Subject: [PATCH 3/6] Fixes support for a single function stream apps; fixes gh-1314 --- .../stream/StreamOutputDestinationMessageReceiver.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/messaging/stream/StreamOutputDestinationMessageReceiver.java b/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/messaging/stream/StreamOutputDestinationMessageReceiver.java index 9e5a36c51a..164d6e9961 100644 --- a/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/messaging/stream/StreamOutputDestinationMessageReceiver.java +++ b/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/messaging/stream/StreamOutputDestinationMessageReceiver.java @@ -65,6 +65,9 @@ class StreamOutputDestinationMessageReceiver private int indexOfDestination(StreamFunctionProperties streamFunctionProperties, String destination) { String[] split = streamFunctionProperties.getDefinition().split(";"); + if (split.length == 1) { + return 0; + } int indexOfDestination = Arrays.stream(split).map(String::toLowerCase) .collect(Collectors.toList()).indexOf(destination.toLowerCase()); if (indexOfDestination == -1) { From 12f9551deae0b0502504d49172688cb2dce56490 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 28 Jan 2020 14:09:02 +0100 Subject: [PATCH 4/6] Bumped Groovy to 2.5.9 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cc6766bca4..4dd91a86b0 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ 1.6.3 - 2.5.8 + 2.5.9 3.5.4 From 331adf0b6268c579083eccb2e17b8f235a32adc6 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 28 Jan 2020 19:20:29 +0100 Subject: [PATCH 5/6] Bumped Gradle to 5.6.4 --- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradlew.bat | 200 +++++++++--------- 2 files changed, 101 insertions(+), 101 deletions(-) diff --git a/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/gradle/wrapper/gradle-wrapper.properties b/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/gradle/wrapper/gradle-wrapper.properties index 7c4388a921..5028f28f8e 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/gradle/wrapper/gradle-wrapper.properties +++ b/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/gradlew.bat b/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/gradlew.bat index 9618d8d960..24467a141f 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/gradlew.bat +++ b/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/gradlew.bat @@ -1,100 +1,100 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega From 21978af96c8d07b64e3b71e81bfa0a95e7960afb Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 28 Jan 2020 19:59:08 +0100 Subject: [PATCH 6/6] Added support for the Spring Cloud Load Balancer module fixes gh-1312 --- .../complete/contract-rest-client/pom.xml | 2 +- .../complete/contract-rest-service/pom.xml | 2 +- .../initial/contract-rest-client/pom.xml | 2 +- .../initial/contract-rest-service/pom.xml | 2 +- .../contracts/com/example/server/pom.xml | 2 +- .../dsl/http-client/gradle.properties | 2 +- samples/standalone/dsl/http-client/pom.xml | 2 +- .../dsl/http-server/gradle.properties | 2 +- samples/standalone/dsl/http-server/pom.xml | 2 +- .../restdocs/http-client/gradle.properties | 2 +- .../standalone/restdocs/http-client/pom.xml | 2 +- .../restdocs/http-server/gradle.properties | 2 +- .../standalone/restdocs/http-server/pom.xml | 2 +- .../webclient/http-client/gradle.properties | 2 +- .../standalone/webclient/http-client/pom.xml | 2 +- .../webclient/http-server/gradle.properties | 2 +- .../standalone/webclient/http-server/pom.xml | 2 +- samples/wiremock-jetty/pom.xml | 2 +- samples/wiremock-native/pom.xml | 2 +- samples/wiremock-tomcat/pom.xml | 2 +- samples/wiremock-undertow-ssl/pom.xml | 2 +- samples/wiremock-undertow/pom.xml | 2 +- samples/wiremock/pom.xml | 2 +- ...ingCloudLoadBalancerAutoConfiguration.java | 168 ++++++++++++++++++ ...itional-spring-configuration-metadata.json | 4 +- ...nerSpringCloudAutoConfigurationSpec.groovy | 6 +- .../test/resources/application-cloudtest.yml | 1 + .../scenarioProject/gradle.properties | 2 +- .../scenarioProjectKotlin/gradle.properties | 2 +- .../projects/complex-configuration/pom.xml | 2 +- .../module/pom.xml | 2 +- .../test/projects/plugin-extension/pom.xml | 2 +- .../test/projects/spring-boot-groovy/pom.xml | 2 +- .../test/projects/spring-boot-java/pom.xml | 2 +- 34 files changed, 203 insertions(+), 36 deletions(-) create mode 100644 spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/spring/cloud/loadbalancer/SpringCloudLoadBalancerAutoConfiguration.java diff --git a/guides/gs-contract-rest/complete/contract-rest-client/pom.xml b/guides/gs-contract-rest/complete/contract-rest-client/pom.xml index e71c3a9091..24bcd9dcfe 100644 --- a/guides/gs-contract-rest/complete/contract-rest-client/pom.xml +++ b/guides/gs-contract-rest/complete/contract-rest-client/pom.xml @@ -11,7 +11,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/guides/gs-contract-rest/complete/contract-rest-service/pom.xml b/guides/gs-contract-rest/complete/contract-rest-service/pom.xml index 155d5cf32d..af115e4320 100644 --- a/guides/gs-contract-rest/complete/contract-rest-service/pom.xml +++ b/guides/gs-contract-rest/complete/contract-rest-service/pom.xml @@ -11,7 +11,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/guides/gs-contract-rest/initial/contract-rest-client/pom.xml b/guides/gs-contract-rest/initial/contract-rest-client/pom.xml index 5e06f097ab..b3b26349dc 100644 --- a/guides/gs-contract-rest/initial/contract-rest-client/pom.xml +++ b/guides/gs-contract-rest/initial/contract-rest-client/pom.xml @@ -11,7 +11,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/guides/gs-contract-rest/initial/contract-rest-service/pom.xml b/guides/gs-contract-rest/initial/contract-rest-service/pom.xml index 618a67673d..2388b47f3a 100644 --- a/guides/gs-contract-rest/initial/contract-rest-service/pom.xml +++ b/guides/gs-contract-rest/initial/contract-rest-service/pom.xml @@ -11,7 +11,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/standalone/contracts/com/example/server/pom.xml b/samples/standalone/contracts/com/example/server/pom.xml index a76a3c20b0..4a0e9a909e 100644 --- a/samples/standalone/contracts/com/example/server/pom.xml +++ b/samples/standalone/contracts/com/example/server/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/standalone/dsl/http-client/gradle.properties b/samples/standalone/dsl/http-client/gradle.properties index 81b66c98d3..5dffcdae73 100644 --- a/samples/standalone/dsl/http-client/gradle.properties +++ b/samples/standalone/dsl/http-client/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=false BOM_VERSION=Hoxton.BUILD-SNAPSHOT -bootVersion=2.2.2.RELEASE \ No newline at end of file +bootVersion=2.2.4.RELEASE \ No newline at end of file diff --git a/samples/standalone/dsl/http-client/pom.xml b/samples/standalone/dsl/http-client/pom.xml index 8edda643d1..368582cf10 100644 --- a/samples/standalone/dsl/http-client/pom.xml +++ b/samples/standalone/dsl/http-client/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/standalone/dsl/http-server/gradle.properties b/samples/standalone/dsl/http-server/gradle.properties index 5fbc7d5fad..717eaf0260 100644 --- a/samples/standalone/dsl/http-server/gradle.properties +++ b/samples/standalone/dsl/http-server/gradle.properties @@ -1,4 +1,4 @@ org.gradle.daemon=false verifierVersion=2.2.2.BUILD-SNAPSHOT BOM_VERSION=Hoxton.BUILD-SNAPSHOT -bootVersion=2.2.2.RELEASE \ No newline at end of file +bootVersion=2.2.4.RELEASE \ No newline at end of file diff --git a/samples/standalone/dsl/http-server/pom.xml b/samples/standalone/dsl/http-server/pom.xml index ca7aab29ec..af1fb5e7f8 100644 --- a/samples/standalone/dsl/http-server/pom.xml +++ b/samples/standalone/dsl/http-server/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/standalone/restdocs/http-client/gradle.properties b/samples/standalone/restdocs/http-client/gradle.properties index 5fbc7d5fad..717eaf0260 100644 --- a/samples/standalone/restdocs/http-client/gradle.properties +++ b/samples/standalone/restdocs/http-client/gradle.properties @@ -1,4 +1,4 @@ org.gradle.daemon=false verifierVersion=2.2.2.BUILD-SNAPSHOT BOM_VERSION=Hoxton.BUILD-SNAPSHOT -bootVersion=2.2.2.RELEASE \ No newline at end of file +bootVersion=2.2.4.RELEASE \ No newline at end of file diff --git a/samples/standalone/restdocs/http-client/pom.xml b/samples/standalone/restdocs/http-client/pom.xml index f1d63ca995..c8129b7ce7 100644 --- a/samples/standalone/restdocs/http-client/pom.xml +++ b/samples/standalone/restdocs/http-client/pom.xml @@ -31,7 +31,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/standalone/restdocs/http-server/gradle.properties b/samples/standalone/restdocs/http-server/gradle.properties index 5fbc7d5fad..717eaf0260 100644 --- a/samples/standalone/restdocs/http-server/gradle.properties +++ b/samples/standalone/restdocs/http-server/gradle.properties @@ -1,4 +1,4 @@ org.gradle.daemon=false verifierVersion=2.2.2.BUILD-SNAPSHOT BOM_VERSION=Hoxton.BUILD-SNAPSHOT -bootVersion=2.2.2.RELEASE \ No newline at end of file +bootVersion=2.2.4.RELEASE \ No newline at end of file diff --git a/samples/standalone/restdocs/http-server/pom.xml b/samples/standalone/restdocs/http-server/pom.xml index f97b7aa308..b087dae66b 100644 --- a/samples/standalone/restdocs/http-server/pom.xml +++ b/samples/standalone/restdocs/http-server/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/standalone/webclient/http-client/gradle.properties b/samples/standalone/webclient/http-client/gradle.properties index 5fbc7d5fad..717eaf0260 100644 --- a/samples/standalone/webclient/http-client/gradle.properties +++ b/samples/standalone/webclient/http-client/gradle.properties @@ -1,4 +1,4 @@ org.gradle.daemon=false verifierVersion=2.2.2.BUILD-SNAPSHOT BOM_VERSION=Hoxton.BUILD-SNAPSHOT -bootVersion=2.2.2.RELEASE \ No newline at end of file +bootVersion=2.2.4.RELEASE \ No newline at end of file diff --git a/samples/standalone/webclient/http-client/pom.xml b/samples/standalone/webclient/http-client/pom.xml index 38ce4a1a89..9c839ad3ad 100644 --- a/samples/standalone/webclient/http-client/pom.xml +++ b/samples/standalone/webclient/http-client/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/standalone/webclient/http-server/gradle.properties b/samples/standalone/webclient/http-server/gradle.properties index 5fbc7d5fad..717eaf0260 100644 --- a/samples/standalone/webclient/http-server/gradle.properties +++ b/samples/standalone/webclient/http-server/gradle.properties @@ -1,4 +1,4 @@ org.gradle.daemon=false verifierVersion=2.2.2.BUILD-SNAPSHOT BOM_VERSION=Hoxton.BUILD-SNAPSHOT -bootVersion=2.2.2.RELEASE \ No newline at end of file +bootVersion=2.2.4.RELEASE \ No newline at end of file diff --git a/samples/standalone/webclient/http-server/pom.xml b/samples/standalone/webclient/http-server/pom.xml index 1d0edaa9c6..1dd251d003 100644 --- a/samples/standalone/webclient/http-server/pom.xml +++ b/samples/standalone/webclient/http-server/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/wiremock-jetty/pom.xml b/samples/wiremock-jetty/pom.xml index 4be2c13cbd..979591834c 100644 --- a/samples/wiremock-jetty/pom.xml +++ b/samples/wiremock-jetty/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/wiremock-native/pom.xml b/samples/wiremock-native/pom.xml index 13b79af9f3..fb6c6f7388 100644 --- a/samples/wiremock-native/pom.xml +++ b/samples/wiremock-native/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/wiremock-tomcat/pom.xml b/samples/wiremock-tomcat/pom.xml index c550d4a581..d56e449ba1 100644 --- a/samples/wiremock-tomcat/pom.xml +++ b/samples/wiremock-tomcat/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/wiremock-undertow-ssl/pom.xml b/samples/wiremock-undertow-ssl/pom.xml index cee2bc05a1..accb3dd402 100644 --- a/samples/wiremock-undertow-ssl/pom.xml +++ b/samples/wiremock-undertow-ssl/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/wiremock-undertow/pom.xml b/samples/wiremock-undertow/pom.xml index aca64b5efc..af66218997 100644 --- a/samples/wiremock-undertow/pom.xml +++ b/samples/wiremock-undertow/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/samples/wiremock/pom.xml b/samples/wiremock/pom.xml index 38536cc3c5..f60db4d89f 100644 --- a/samples/wiremock/pom.xml +++ b/samples/wiremock/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/spring/cloud/loadbalancer/SpringCloudLoadBalancerAutoConfiguration.java b/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/spring/cloud/loadbalancer/SpringCloudLoadBalancerAutoConfiguration.java new file mode 100644 index 0000000000..4ef717d7e6 --- /dev/null +++ b/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/spring/cloud/loadbalancer/SpringCloudLoadBalancerAutoConfiguration.java @@ -0,0 +1,168 @@ +/* + * Copyright 2012-2020 the original author or authors. + * + * 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 + * + * https://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. + */ + +package org.springframework.cloud.contract.stubrunner.spring.cloud.loadbalancer; + +import java.io.Closeable; +import java.net.URI; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import reactor.core.publisher.Mono; + +import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.autoconfigure.AutoConfigureBefore; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.cloud.client.ServiceInstance; +import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; +import org.springframework.cloud.client.loadbalancer.reactive.DefaultResponse; +import org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer; +import org.springframework.cloud.contract.stubrunner.RunningStubs; +import org.springframework.cloud.contract.stubrunner.StubConfiguration; +import org.springframework.cloud.contract.stubrunner.StubFinder; +import org.springframework.cloud.contract.stubrunner.spring.cloud.ConditionalOnStubbedDiscoveryEnabled; +import org.springframework.cloud.contract.stubrunner.spring.cloud.StubMapperProperties; +import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClientConfiguration; +import org.springframework.cloud.loadbalancer.config.LoadBalancerAutoConfiguration; +import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.util.StringUtils; + +/** + * Provides autoconfiguraion for the Spring Cloud Load Balancer module. + * + * @since 3.0.0 + * @author Marcin Grzejszczak + */ +@Configuration(proxyBeanMethods = false) +@ConditionalOnClass(LoadBalancerClient.class) +@ConditionalOnProperty(value = "stubrunner.cloud.loadbalancer.enabled", + matchIfMissing = true) +@ConditionalOnBean(StubMapperProperties.class) +@AutoConfigureBefore(LoadBalancerAutoConfiguration.class) +@AutoConfigureAfter(LoadBalancerClientConfiguration.class) +@ConditionalOnStubbedDiscoveryEnabled +public class SpringCloudLoadBalancerAutoConfiguration { + + @Bean + @Primary + LoadBalancerClientFactory stubRunnerLoadBalancerClientFactory(StubFinder stubFinder, + StubMapperProperties stubMapperProperties) { + return new StubRunnerLoadBalancerClientFactory(stubFinder, stubMapperProperties); + } + +} + +class StubRunnerLoadBalancerClientFactory extends LoadBalancerClientFactory + implements Closeable { + + private final StubFinder stubFinder; + + private final StubMapperProperties stubMapperProperties; + + StubRunnerLoadBalancerClientFactory(StubFinder stubFinder, + StubMapperProperties stubMapperProperties) { + this.stubFinder = stubFinder; + this.stubMapperProperties = stubMapperProperties; + } + + @Override + public ReactiveLoadBalancer getInstance(String serviceId) { + return request -> Mono.just(new DefaultResponse( + new StubbedServiceInstance(stubFinder, stubMapperProperties, serviceId))); + } + + @Override + public void close() { + StubbedServiceInstance.CACHE.clear(); + } + +} + +class StubbedServiceInstance implements ServiceInstance { + + private final StubFinder stubFinder; + + private final StubMapperProperties stubMapperProperties; + + private final String serviceId; + + static final Map> CACHE = new ConcurrentHashMap<>(); + + StubbedServiceInstance(StubFinder stubFinder, + StubMapperProperties stubMapperProperties, String serviceId) { + this.stubFinder = stubFinder; + this.stubMapperProperties = stubMapperProperties; + this.serviceId = serviceId; + } + + private Map.Entry stubEntry() { + Map.Entry entry = CACHE.get(this.serviceId); + if (entry != null) { + return entry; + } + RunningStubs runningStubs = this.stubFinder.findAllRunningStubs(); + String mappedServiceName = StringUtils.hasText( + this.stubMapperProperties.fromServiceIdToIvyNotation(this.serviceId)) + ? this.stubMapperProperties.fromServiceIdToIvyNotation( + this.serviceId) + : this.serviceId; + entry = runningStubs.getEntry(mappedServiceName); + CACHE.put(this.serviceId, entry); + return entry; + } + + @Override + public String getServiceId() { + return this.serviceId; + } + + @Override + public String getHost() { + return "localhost"; + } + + @Override + public int getPort() { + Map.Entry entry = stubEntry(); + if (entry == null) { + return 0; + } + return entry.getValue(); + } + + @Override + public boolean isSecure() { + // TODO: What if the user marks a stub as secure? + return false; + } + + @Override + public URI getUri() { + return URI.create( + (isSecure() ? "https://" : "http://") + getHost() + ":" + getPort()); + } + + @Override + public Map getMetadata() { + return null; + } + +} diff --git a/spring-cloud-contract-stub-runner/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-cloud-contract-stub-runner/src/main/resources/META-INF/additional-spring-configuration-metadata.json index f7cda2fca5..9130066f3f 100644 --- a/spring-cloud-contract-stub-runner/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-cloud-contract-stub-runner/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -37,9 +37,9 @@ "defaultValue": true }, { - "name": "stubrunner.cloud.ribbon.enabled", + "name": "stubrunner.cloud.loadbalancer.enabled", "type": "java.lang.Boolean", - "description": "Whether to enable Stub Runner's Ribbon integration.", + "description": "Whether to enable Stub Runner's Spring Cloud Load Balancer integration.", "defaultValue": true }, { diff --git a/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/spring/cloud/StubRunnerSpringCloudAutoConfigurationSpec.groovy b/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/spring/cloud/StubRunnerSpringCloudAutoConfigurationSpec.groovy index bc5964fc20..a92e5e738a 100644 --- a/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/spring/cloud/StubRunnerSpringCloudAutoConfigurationSpec.groovy +++ b/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/spring/cloud/StubRunnerSpringCloudAutoConfigurationSpec.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2013-2019 the original author or authors. + * Copyright 2013-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,13 +30,11 @@ import org.springframework.cloud.contract.stubrunner.spring.AutoConfigureStubRun import org.springframework.cloud.contract.stubrunner.spring.StubRunnerProperties import org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration import org.springframework.cloud.zookeeper.ZookeeperAutoConfiguration -import org.springframework.cloud.zookeeper.discovery.RibbonZookeeperAutoConfiguration import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.test.context.ActiveProfiles import org.springframework.test.context.ContextConfiguration import org.springframework.web.client.RestTemplate - /** * @author Marcin Grzejszczak */ @@ -78,7 +76,7 @@ class StubRunnerSpringCloudAutoConfigurationSpec extends Specification { // end::test[] @Configuration - @EnableAutoConfiguration(exclude = [RibbonZookeeperAutoConfiguration, EurekaClientAutoConfiguration, + @EnableAutoConfiguration(exclude = [EurekaClientAutoConfiguration, ConsulAutoConfiguration, ZookeeperAutoConfiguration]) static class Config { diff --git a/spring-cloud-contract-stub-runner/src/test/resources/application-cloudtest.yml b/spring-cloud-contract-stub-runner/src/test/resources/application-cloudtest.yml index ffdf85bd4a..72b4677623 100644 --- a/spring-cloud-contract-stub-runner/src/test/resources/application-cloudtest.yml +++ b/spring-cloud-contract-stub-runner/src/test/resources/application-cloudtest.yml @@ -9,3 +9,4 @@ spring.cloud: discovery.enabled: false service-registry.enabled: false eureka.client.enabled: false +ribbon.eureka.enabled: false diff --git a/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/scenarioProject/gradle.properties b/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/scenarioProject/gradle.properties index 3fef02e4fe..108b3f8dfb 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/scenarioProject/gradle.properties +++ b/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/scenarioProject/gradle.properties @@ -16,5 +16,5 @@ wiremockVersion=2.25.1 jsonAssertVersion=0.4.13 verifierVersion=2.2.2.BUILD-SNAPSHOT -bootVersion=2.2.2.RELEASE +bootVersion=2.2.4.RELEASE groovyVersion=2.4.17 diff --git a/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/scenarioProjectKotlin/gradle.properties b/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/scenarioProjectKotlin/gradle.properties index 3fef02e4fe..108b3f8dfb 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/scenarioProjectKotlin/gradle.properties +++ b/spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/scenarioProjectKotlin/gradle.properties @@ -16,5 +16,5 @@ wiremockVersion=2.25.1 jsonAssertVersion=0.4.13 verifierVersion=2.2.2.BUILD-SNAPSHOT -bootVersion=2.2.2.RELEASE +bootVersion=2.2.4.RELEASE groovyVersion=2.4.17 diff --git a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/complex-configuration/pom.xml b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/complex-configuration/pom.xml index 06679665d2..ee60eaa22e 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/complex-configuration/pom.xml +++ b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/complex-configuration/pom.xml @@ -29,7 +29,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/different-module-configuration/module/pom.xml b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/different-module-configuration/module/pom.xml index 5d04da6435..6ddf022be8 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/different-module-configuration/module/pom.xml +++ b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/different-module-configuration/module/pom.xml @@ -29,7 +29,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/plugin-extension/pom.xml b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/plugin-extension/pom.xml index 78bc0233f7..fd3ccbbe1a 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/plugin-extension/pom.xml +++ b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/plugin-extension/pom.xml @@ -29,7 +29,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/spring-boot-groovy/pom.xml b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/spring-boot-groovy/pom.xml index abc3120f1a..1986539e7c 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/spring-boot-groovy/pom.xml +++ b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/spring-boot-groovy/pom.xml @@ -29,7 +29,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE diff --git a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/spring-boot-java/pom.xml b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/spring-boot-java/pom.xml index 78bc0233f7..fd3ccbbe1a 100644 --- a/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/spring-boot-java/pom.xml +++ b/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/test/projects/spring-boot-java/pom.xml @@ -29,7 +29,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.2.RELEASE + 2.2.4.RELEASE