Going back to snapshots

This commit is contained in:
buildmaster
2022-02-17 16:21:01 +00:00
parent 8925ab5e3f
commit 80338bc99b
16 changed files with 22 additions and 26 deletions

View File

@@ -27,7 +27,7 @@ Extract the files into the JDK/jre/lib/security folder for whichever version of
== Building
:jdkversion: 17
:jdkversion: 1.8
=== Basic Compile and Test

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<name>Spring Cloud Commons Docs</name>

View File

@@ -1,7 +1,7 @@
|===
|Name | Default | Description
|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.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.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.

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Commons Parent</name>
<description>Spring Cloud Commons Parent</description>
@@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<scm>

View File

@@ -6,11 +6,11 @@
<parent>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>3.1.1</version>
<version>3.1.0</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-commons-dependencies</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>spring-cloud-commons-dependencies</name>
<description>Spring Cloud Commons Dependencies</description>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-commons</artifactId>

View File

@@ -30,7 +30,6 @@ 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() {
@@ -67,13 +66,11 @@ 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);
@@ -81,6 +78,7 @@ public final class IdUtils {
/**
* Gets the unresolved template for the service id <i>without active profiles.</i>
*
* @return The combination of properties to create a unique service id.
*/
public static String getUnresolvedServiceId() {
@@ -89,6 +87,7 @@ 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() {

View File

@@ -116,8 +116,7 @@ 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
@@ -149,8 +148,7 @@ 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));
}
@@ -181,5 +179,4 @@ public class IdUtilsTests {
env.setProperty("spring.profiles.active", "123profile");
then("springname:123profile:1234:123abc").isEqualTo(IdUtils.getResolvedServiceId(env));
}
}

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context-integration-tests</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context-webflux-integration-tests</artifactId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-loadbalancer</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<packaging>jar</packaging>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
</parent>
<artifactId>spring-cloud-starter</artifactId>
<name>spring-cloud-starter</name>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>3.1.1</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-test-support</artifactId>