diff --git a/.github/dco.yml b/.github/dco.yml new file mode 100644 index 00000000..37e411e1 --- /dev/null +++ b/.github/dco.yml @@ -0,0 +1,2 @@ +require: + members: false \ No newline at end of file diff --git a/README.adoc b/README.adoc index 03410549..4a826d42 100644 --- a/README.adoc +++ b/README.adoc @@ -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 diff --git a/docs/modules/ROOT/partials/_configprops.adoc b/docs/modules/ROOT/partials/_configprops.adoc index 7d261e79..45941b98 100644 --- a/docs/modules/ROOT/partials/_configprops.adoc +++ b/docs/modules/ROOT/partials/_configprops.adoc @@ -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. diff --git a/docs/pom.xml b/docs/pom.xml index e9f98a28..333bf8e9 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -8,7 +8,7 @@ org.springframework.cloud spring-cloud-commons-parent - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT jar Spring Cloud Commons Docs diff --git a/pom.xml b/pom.xml index 8b6f2781..162991b7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.cloud spring-cloud-commons-parent - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT pom Spring Cloud Commons Parent Spring Cloud Commons Parent @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml index af72a3c7..80b4971e 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 - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT spring-cloud-commons-dependencies - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT pom spring-cloud-commons-dependencies Spring Cloud Commons Dependencies diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml index a0c55a7c..d246f36f 100644 --- a/spring-cloud-commons/pom.xml +++ b/spring-cloud-commons/pom.xml @@ -7,7 +7,7 @@ org.springframework.cloud spring-cloud-commons-parent - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT .. spring-cloud-commons diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/CompatibilityVerifierProperties.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/CompatibilityVerifierProperties.java index 97ae7d2d..a5663ab7 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/CompatibilityVerifierProperties.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/CompatibilityVerifierProperties.java @@ -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 compatibleBootVersions = List.of("3.4.x"); + private List compatibleBootVersions = List.of("3.5.x"); public boolean isEnabled() { return this.enabled; diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/SpringBootVersionVerifier.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/SpringBootVersionVerifier.java index 6da9c9bf..880f49f9 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/SpringBootVersionVerifier.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/SpringBootVersionVerifier.java @@ -35,7 +35,7 @@ class SpringBootVersionVerifier implements CompatibilityVerifier { final Map 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) { diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/configuration/SpringBootDependencyTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/configuration/SpringBootDependencyTests.java index cef25841..825ddc6a 100644 --- a/spring-cloud-commons/src/test/java/org/springframework/cloud/configuration/SpringBootDependencyTests.java +++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/configuration/SpringBootDependencyTests.java @@ -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(); diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml index 4d29611b..b316f1b2 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 - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT .. 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 84e83679..3a181468 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 - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT .. spring-cloud-context-webflux-integration-tests diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml index 8eeb6c06..02277300 100644 --- a/spring-cloud-context/pom.xml +++ b/spring-cloud-context/pom.xml @@ -7,7 +7,7 @@ org.springframework.cloud spring-cloud-commons-parent - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT .. spring-cloud-context diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java b/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java index e2004b5e..57e26fc0 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java @@ -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 { diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java b/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java index 98149392..4982b980 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java @@ -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 extract(MutablePropertySources propertySources) { Map result = new HashMap<>(); List> sources = new ArrayList<>(); diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/util/PropertyUtils.java b/spring-cloud-context/src/main/java/org/springframework/cloud/util/PropertyUtils.java index 0150d2ad..fca2231c 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/util/PropertyUtils.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/util/PropertyUtils.java @@ -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) { diff --git a/spring-cloud-loadbalancer/pom.xml b/spring-cloud-loadbalancer/pom.xml index f8a0d717..d05d4b4a 100644 --- a/spring-cloud-loadbalancer/pom.xml +++ b/spring-cloud-loadbalancer/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT .. spring-cloud-loadbalancer diff --git a/spring-cloud-starter-bootstrap/pom.xml b/spring-cloud-starter-bootstrap/pom.xml index 9394e2c9..3749612b 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 - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT .. jar diff --git a/spring-cloud-starter-loadbalancer/pom.xml b/spring-cloud-starter-loadbalancer/pom.xml index 01f9b82e..6caac92c 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 - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT .. 4.0.0 diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml index 3eebcede..220b42ca 100644 --- a/spring-cloud-starter/pom.xml +++ b/spring-cloud-starter/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT spring-cloud-starter spring-cloud-starter diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml index 8f78edeb..5bfaef1f 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 - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT .. spring-cloud-test-support @@ -84,17 +84,6 @@ org.hibernate.validator hibernate-validator test - - - javax.validation - validation-api - - - - - jakarta.validation - jakarta.validation-api - test