diff --git a/README.adoc b/README.adoc index b1c6306d..166e078f 100644 --- a/README.adoc +++ b/README.adoc @@ -27,7 +27,7 @@ Extract the files into the JDK/jre/lib/security folder for whichever version of == Building -:jdkversion: 1.8 +:jdkversion: 17 === Basic Compile and Test diff --git a/docs/pom.xml b/docs/pom.xml index 8eb89403..77d14b60 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 jar Spring Cloud Commons Docs diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc index 61f60ac9..f902f04e 100644 --- a/docs/src/main/asciidoc/_configprops.adoc +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -1,7 +1,7 @@ |=== |Name | Default | Description -|spring.cloud.compatibility-verifier.compatible-boot-versions | `2.6.x` | Default accepted versions for the Spring Boot dependency. You can set {@code x} for the patch version if you don't want to specify a concrete value. Example: {@code 3.4.x} +|spring.cloud.compatibility-verifier.compatible-boot-versions | | Default accepted versions for the Spring Boot dependency. You can set {@code x} for the patch version if you don't want to specify a concrete value. Example: {@code 3.4.x} |spring.cloud.compatibility-verifier.enabled | `false` | Enables creation of Spring Cloud compatibility verification. |spring.cloud.config.allow-override | `true` | Flag to indicate that {@link #isOverrideSystemProperties() systemPropertiesOverride} can be used. Set to false to prevent users from changing the default accidentally. Default true. |spring.cloud.config.override-none | `false` | Flag to indicate that when {@link #setAllowOverride(boolean) allowOverride} is true, external properties should take lowest priority and should not override any existing property sources (including local config files). Default false. diff --git a/pom.xml b/pom.xml index 403e2b41..e2c5f24a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 pom Spring Cloud Commons Parent Spring Cloud Commons Parent @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 3.1.1-SNAPSHOT + 3.1.1 diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml index 395a0b06..f25c6b55 100644 --- a/spring-cloud-commons-dependencies/pom.xml +++ b/spring-cloud-commons-dependencies/pom.xml @@ -6,11 +6,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 3.1.0 + 3.1.1 spring-cloud-commons-dependencies - 3.1.1-SNAPSHOT + 3.1.1 pom spring-cloud-commons-dependencies Spring Cloud Commons Dependencies diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml index d03509d7..891571be 100644 --- a/spring-cloud-commons/pom.xml +++ b/spring-cloud-commons/pom.xml @@ -7,7 +7,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 .. spring-cloud-commons diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util/IdUtils.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util/IdUtils.java index e7bf3c10..a7689ecb 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util/IdUtils.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util/IdUtils.java @@ -30,6 +30,7 @@ public final class IdUtils { public static final String DEFAULT_SERVICE_ID_STRING = "${vcap.application.name:${spring.application.name:application}}:${vcap.application.instance_index:${spring.application.index:${local.server.port:${server.port:0}}}}:${vcap.application.instance_id:${cachedrandom.${vcap.application.name:${spring.application.name:application}}.value}}"; public static final String DEFAULT_SERVICE_ID_WITH_ACTIVE_PROFILES_STRING = "${vcap.application.name:${spring.application.name:application}:${spring.profiles.active}}:${vcap.application.instance_index:${spring.application.index:${local.server.port:${server.port:0}}}}:${vcap.application.instance_id:${cachedrandom.${vcap.application.name:${spring.application.name:application}}.value}}"; + // @checkstyle:on private IdUtils() { @@ -66,11 +67,13 @@ public final class IdUtils { */ public static String getResolvedServiceId(PropertyResolver resolver) { final String unresolvedServiceId; - // addition of active profiles at the 2nd position of the service ID breaks backwards-compatibility, + // addition of active profiles at the 2nd position of the service ID breaks + // backwards-compatibility, // so we fall back to the old implementation in case no profiles are active if (StringUtils.hasText(resolver.getProperty("spring.profiles.active"))) { unresolvedServiceId = getUnresolvedServiceIdWithActiveProfiles(); - } else { + } + else { unresolvedServiceId = getUnresolvedServiceId(); } return resolver.resolvePlaceholders(unresolvedServiceId); @@ -78,7 +81,6 @@ public final class IdUtils { /** * Gets the unresolved template for the service id without active profiles. - * * @return The combination of properties to create a unique service id. */ public static String getUnresolvedServiceId() { @@ -87,7 +89,6 @@ public final class IdUtils { /** * Gets the unresolved template for the service id including active profiles. - * * @return The combination of properties to create a unique service id. */ public static String getUnresolvedServiceIdWithActiveProfiles() { diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/commons/util/IdUtilsTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/commons/util/IdUtilsTests.java index 0e5e7738..f11f68b3 100644 --- a/spring-cloud-commons/src/test/java/org/springframework/cloud/commons/util/IdUtilsTests.java +++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/commons/util/IdUtilsTests.java @@ -116,7 +116,8 @@ public class IdUtilsTests { @Test public void testUnresolvedServiceIdWithActiveProfiles() { - then(IdUtils.DEFAULT_SERVICE_ID_WITH_ACTIVE_PROFILES_STRING).isEqualTo(IdUtils.getUnresolvedServiceIdWithActiveProfiles()); + then(IdUtils.DEFAULT_SERVICE_ID_WITH_ACTIVE_PROFILES_STRING) + .isEqualTo(IdUtils.getUnresolvedServiceIdWithActiveProfiles()); } @Test @@ -148,7 +149,8 @@ public class IdUtilsTests { env.setProperty("cachedrandom.springname.value", "123abc"); then("springname:1234:123abc").isEqualTo(IdUtils.getResolvedServiceId(env)); - // ensure that for spring.profiles.active, empty string value is equivalent to not being set at all + // ensure that for spring.profiles.active, empty string value is equivalent to not + // being set at all env.setProperty("spring.profiles.active", ""); then("springname:1234:123abc").isEqualTo(IdUtils.getResolvedServiceId(env)); } @@ -179,4 +181,5 @@ public class IdUtilsTests { env.setProperty("spring.profiles.active", "123profile"); then("springname:123profile:1234:123abc").isEqualTo(IdUtils.getResolvedServiceId(env)); } + } diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml index 90d9d0c1..181dc4ae 100644 --- a/spring-cloud-context-integration-tests/pom.xml +++ b/spring-cloud-context-integration-tests/pom.xml @@ -7,7 +7,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 .. spring-cloud-context-integration-tests diff --git a/spring-cloud-context-webflux-integration-tests/pom.xml b/spring-cloud-context-webflux-integration-tests/pom.xml index 28ccf79d..686b1865 100644 --- a/spring-cloud-context-webflux-integration-tests/pom.xml +++ b/spring-cloud-context-webflux-integration-tests/pom.xml @@ -7,7 +7,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 .. spring-cloud-context-webflux-integration-tests diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml index 27f30fdb..b5630ca9 100644 --- a/spring-cloud-context/pom.xml +++ b/spring-cloud-context/pom.xml @@ -7,7 +7,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 .. spring-cloud-context diff --git a/spring-cloud-loadbalancer/pom.xml b/spring-cloud-loadbalancer/pom.xml index a44d7208..729f4bb1 100644 --- a/spring-cloud-loadbalancer/pom.xml +++ b/spring-cloud-loadbalancer/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 .. spring-cloud-loadbalancer diff --git a/spring-cloud-starter-bootstrap/pom.xml b/spring-cloud-starter-bootstrap/pom.xml index 595bbcff..8f374e1a 100644 --- a/spring-cloud-starter-bootstrap/pom.xml +++ b/spring-cloud-starter-bootstrap/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 .. jar diff --git a/spring-cloud-starter-loadbalancer/pom.xml b/spring-cloud-starter-loadbalancer/pom.xml index 5efd01e9..e2beea8d 100644 --- a/spring-cloud-starter-loadbalancer/pom.xml +++ b/spring-cloud-starter-loadbalancer/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 .. 4.0.0 diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml index d992210a..8eaab4a6 100644 --- a/spring-cloud-starter/pom.xml +++ b/spring-cloud-starter/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 spring-cloud-starter spring-cloud-starter diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml index c20b98f3..0e4efe41 100644 --- a/spring-cloud-test-support/pom.xml +++ b/spring-cloud-test-support/pom.xml @@ -7,7 +7,7 @@ org.springframework.cloud spring-cloud-commons-parent - 3.1.1-SNAPSHOT + 3.1.1 .. spring-cloud-test-support