Merge remote-tracking branch 'origin/main'

This commit is contained in:
Olga Maciaszek-Sharma
2025-01-22 18:22:41 +01:00
21 changed files with 36 additions and 84 deletions

2
.github/dco.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
require:
members: false

View File

@@ -109,15 +109,11 @@ tracker for issues and merging pull requests into main. If you want
to contribute even something trivial please do not hesitate, but
follow the guidelines below.
[[sign-the-contributor-license-agreement]]
== Sign the Contributor License Agreement
[[developer-certificate-of-origin]]
== Developer Certificate of Origin (DCO)
Before we accept a non-trivial patch or pull request we will need you to sign the
https://cla.pivotal.io/sign/spring[Contributor License Agreement].
Signing the contributor's agreement does not grant anyone commit rights to the main
repository, but it does mean that we can accept your contributions, and you will get an
author credit if we do. Active contributors might be asked to join the core team, and
given the ability to merge pull requests.
All commits must include a __Signed-off-by__ trailer at the end of each commit message to indicate that the contributor agrees to the Developer Certificate of Origin.
For additional details, please refer to the blog post https://spring.io/blog/2025/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring[Hello DCO, Goodbye CLA: Simplifying Contributions to Spring].
[[code-of-conduct]]
== Code of Conduct

View File

@@ -1,7 +1,7 @@
|===
|Name | Default | Description
|spring.cloud.compatibility-verifier.compatible-boot-versions | `+++3.4.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 | `+++3.5.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.5.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.initialize-on-context-refresh | `+++false+++` | Flag to initialize bootstrap configuration on context refresh event. Default false.

View File

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

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-commons-dependencies</artifactId>
<version>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-commons</artifactId>

View File

@@ -34,9 +34,9 @@ public class CompatibilityVerifierProperties {
/**
* 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}
* {@code 3.5.x}
*/
private List<String> compatibleBootVersions = List.of("3.4.x");
private List<String> compatibleBootVersions = List.of("3.5.x");
public boolean isEnabled() {
return this.enabled;

View File

@@ -35,7 +35,7 @@ class SpringBootVersionVerifier implements CompatibilityVerifier {
final Map<String, CompatibilityPredicate> ACCEPTED_VERSIONS = new HashMap<>() {
{
this.put("3.4", is3_4());
this.put("3.5", is3_5());
}
};
@@ -70,18 +70,18 @@ class SpringBootVersionVerifier implements CompatibilityVerifier {
return SpringBootVersion.getVersion();
}
CompatibilityPredicate is3_4() {
CompatibilityPredicate is3_5() {
return new CompatibilityPredicate() {
@Override
public String toString() {
return "Predicate for Boot 3.4";
return "Predicate for Boot 3.5";
}
@Override
public boolean isCompatible() {
try {
Class.forName("org.springframework.boot.autoconfigure.web.client.RestClientSsl");
Class.forName("org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty");
return true;
}
catch (ClassNotFoundException e) {

View File

@@ -176,8 +176,8 @@ public class SpringBootDependencyTests {
@Test
public void should_match_against_current_manifest() {
try {
verifyCurrentVersionFromManifest("3.4");
verifyCurrentVersionFromManifest("3.4.x");
verifyCurrentVersionFromManifest("3.5");
verifyCurrentVersionFromManifest("3.5.x");
}
catch (AssertionError e) {
// if (e.getMessage() != null && e.getMessage().contains("3.3.")) {
@@ -212,7 +212,7 @@ public class SpringBootDependencyTests {
}
};
versionVerifier.ACCEPTED_VERSIONS.clear();
versionVerifier.ACCEPTED_VERSIONS.put("3.0", versionVerifier.is3_4());
versionVerifier.ACCEPTED_VERSIONS.put("3.0", versionVerifier.is3_5());
VerificationResult verificationResult = versionVerifier.verify();
@@ -230,7 +230,7 @@ public class SpringBootDependencyTests {
}
};
versionVerifier.ACCEPTED_VERSIONS.clear();
versionVerifier.ACCEPTED_VERSIONS.put("3.0", versionVerifier.is3_4());
versionVerifier.ACCEPTED_VERSIONS.put("3.0", versionVerifier.is3_5());
VerificationResult verificationResult = versionVerifier.verify();

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context</artifactId>

View File

@@ -23,9 +23,6 @@ import java.util.Set;
import org.springframework.aop.scope.ScopedProxyUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -53,11 +50,9 @@ import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.weaving.LoadTimeWeaverAware;
import org.springframework.core.env.Environment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.style.ToStringCreator;
import org.springframework.instrument.classloading.LoadTimeWeaver;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
@@ -119,7 +114,7 @@ public class RefreshAutoConfiguration {
return new ConfigDataContextRefresher(context, scope, properties);
}
@ConditionalOnProperty(value = "spring.cloud.refresh.on-restart.enabled", matchIfMissing = true)
@ConditionalOnProperty(value = REFRESH_SCOPE_PREFIX + ".on-restart.enabled", matchIfMissing = true)
@Bean
RefreshScopeLifecycle refreshScopeLifecycle(ContextRefresher contextRefresher) {
return new RefreshScopeLifecycle(contextRefresher);
@@ -158,27 +153,6 @@ public class RefreshAutoConfiguration {
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(name = "javax.persistence.EntityManagerFactory")
protected static class JpaInvokerConfiguration implements LoadTimeWeaverAware, InitializingBean {
@Autowired
private ListableBeanFactory beanFactory;
@Override
public void afterPropertiesSet() {
String cls = "org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker";
if (this.beanFactory.containsBean(cls)) {
this.beanFactory.getBean(cls);
}
}
@Override
public void setLoadTimeWeaver(LoadTimeWeaver ltw) {
}
}
@Component
protected static class RefreshScopeBeanDefinitionEnhancer
implements BeanDefinitionRegistryPostProcessor, EnvironmentAware {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2025 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.
@@ -22,6 +22,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -139,7 +140,7 @@ public abstract class ContextRefresher {
if (!after.containsKey(key)) {
result.put(key, null);
}
else if (!equal(before.get(key), after.get(key))) {
else if (!Objects.equals(before.get(key), after.get(key))) {
result.put(key, after.get(key));
}
}
@@ -151,16 +152,6 @@ public abstract class ContextRefresher {
return result;
}
private boolean equal(Object one, Object two) {
if (one == null && two == null) {
return true;
}
if (one == null || two == null) {
return false;
}
return one.equals(two);
}
private Map<String, Object> extract(MutablePropertySources propertySources) {
Map<String, Object> result = new HashMap<>();
List<PropertySource<?>> sources = new ArrayList<>();

View File

@@ -42,7 +42,7 @@ public abstract class PropertyUtils {
public static final boolean MARKER_CLASS_EXISTS = ClassUtils.isPresent(MARKER_CLASS, null);
private PropertyUtils() {
throw new UnsupportedOperationException("unable to instatiate utils class");
throw new UnsupportedOperationException("unable to instantiate utils class");
}
public static boolean bootstrapEnabled(Environment environment) {

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-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>4.2.1-SNAPSHOT</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-test-support</artifactId>
@@ -84,17 +84,6 @@
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>