Merge remote-tracking branch 'origin/4.1.x' into 4.1.x
This commit is contained in:
2
.github/dco.yml
vendored
Normal file
2
.github/dco.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
require:
|
||||
members: false
|
||||
2
.github/workflows/maven.yml
vendored
2
.github/workflows/maven.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
- name: Build with Maven
|
||||
run: ./mvnw -s .settings.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install -U -P sonar -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
- name: Publish Test Report
|
||||
uses: mikepenz/action-junit-report@v4
|
||||
uses: mikepenz/action-junit-report@v5
|
||||
if: always() # always run even if the previous step fails
|
||||
with:
|
||||
report_paths: '**/surefire-reports/TEST-*.xml'
|
||||
|
||||
@@ -6,7 +6,7 @@ nav:
|
||||
ext:
|
||||
collector:
|
||||
run:
|
||||
command: ./mvnw --no-transfer-progress -B process-resources -Pdocs -pl docs -Dantora-maven-plugin.phase=none -Dgenerate-docs.phase=none -Dgenerate-readme.phase=none -Dgenerate-cloud-resources.phase=none -Dmaven-dependency-plugin-for-docs.phase=none -Dmaven-dependency-plugin-for-docs-classes.phase=none -DskipTests
|
||||
command: ./mvnw --no-transfer-progress -B process-resources -Pdocs -pl docs -Dantora-maven-plugin.phase=none -Dgenerate-docs.phase=none -Dgenerate-readme.phase=none -Dgenerate-cloud-resources.phase=none -Dmaven-dependency-plugin-for-docs.phase=none -Dmaven-dependency-plugin-for-docs-classes.phase=none -DskipTests -DdisableConfigurationProperties
|
||||
local: true
|
||||
scan:
|
||||
dir: ./target/classes/antora-resources/
|
||||
|
||||
@@ -85,9 +85,9 @@ The `Customizer` interface has a single method (called `customize`) that takes t
|
||||
For detailed information on how to customize a given implementation see
|
||||
the following documentation:
|
||||
|
||||
* link:../../../../spring-cloud-circuitbreaker/current/reference/html/spring-cloud-circuitbreaker.html#configuring-resilience4j-circuit-breakers[Resilience4J]
|
||||
* link:../../../../spring-cloud-circuitbreaker/reference/spring-cloud-circuitbreaker-resilience4j.html[Resilience4J]
|
||||
* link:https://github.com/alibaba/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-docs/src/main/asciidoc/circuitbreaker-sentinel.adoc#circuit-breaker-spring-cloud-circuit-breaker-with-sentinel--configuring-sentinel-circuit-breakers[Sentinel]
|
||||
* link:../../../../../spring-cloud-circuitbreaker/docs/current/reference/html/spring-cloud-circuitbreaker.html#configuring-spring-retry-circuit-breakers[Spring Retry]
|
||||
* link:../../../../../spring-cloud-circuitbreaker/reference/spring-cloud-circuitbreaker-spring-retry.html[Spring Retry]
|
||||
|
||||
Some `CircuitBreaker` implementations such as `Resilience4JCircuitBreaker` call `customize` method every time `CircuitBreaker#run` is called.
|
||||
It can be inefficient. In that case, you can use `CircuitBreaker#once` method. It is useful where calling `customize` many times doesn't make sense,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"antora": "3.2.0-alpha.6",
|
||||
"@antora/atlas-extension": "1.0.0-alpha.2",
|
||||
"@antora/collector-extension": "1.0.0-beta.3",
|
||||
"@asciidoctor/tabs": "1.0.0-beta.6",
|
||||
"@springio/antora-extensions": "1.14.2",
|
||||
"@springio/asciidoctor-extensions": "1.0.0-alpha.14"
|
||||
}
|
||||
"dependencies": {
|
||||
"antora": "3.2.0-alpha.8",
|
||||
"@antora/atlas-extension": "1.0.0-alpha.2",
|
||||
"@antora/collector-extension": "1.0.1",
|
||||
"@asciidoctor/tabs": "1.0.0-beta.6",
|
||||
"@springio/antora-extensions": "1.14.4",
|
||||
"@springio/asciidoctor-extensions": "1.0.0-alpha.17"
|
||||
}
|
||||
}
|
||||
|
||||
30
docs/pom.xml
30
docs/pom.xml
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
<name>Spring Cloud Commons Docs</name>
|
||||
@@ -26,20 +26,28 @@
|
||||
<micrometer-docs-generator.inclusionPattern>.*</micrometer-docs-generator.inclusionPattern>
|
||||
<micrometer-docs-generator.outputPath>${maven.multiModuleProjectDirectory}/docs/modules/ROOT/partials/</micrometer-docs-generator.outputPath>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<sourceDirectory>src/main/asciidoc</sourceDirectory>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>enable-configuration-properties</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>!disableConfigurationProperties</name>
|
||||
</property>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>docs</id>
|
||||
<build>
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-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.1.4-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<scm>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>4.1.4-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-commons-dependencies</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>spring-cloud-commons-dependencies</name>
|
||||
<description>Spring Cloud Commons Dependencies</description>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-commons</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-context-integration-tests</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-context-webflux-integration-tests</artifactId>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-context</artifactId>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -92,9 +92,6 @@ public class ConfigDataContextRefresher extends ContextRefresher
|
||||
postProcessor.postProcessEnvironment(environment, application);
|
||||
}
|
||||
|
||||
if (environment.getPropertySources().contains(REFRESH_ARGS_PROPERTY_SOURCE)) {
|
||||
environment.getPropertySources().remove(REFRESH_ARGS_PROPERTY_SOURCE);
|
||||
}
|
||||
MutablePropertySources target = getContext().getEnvironment().getPropertySources();
|
||||
String targetName = null;
|
||||
for (PropertySource<?> source : environment.getPropertySources()) {
|
||||
|
||||
@@ -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;
|
||||
@@ -50,8 +51,6 @@ public abstract class ContextRefresher {
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
protected static final String REFRESH_ARGS_PROPERTY_SOURCE = "refreshArgs";
|
||||
|
||||
protected static final String[] DEFAULT_PROPERTY_SOURCES = new String[] {
|
||||
// order matters, if cli args aren't first, things get messy
|
||||
CommandLinePropertySource.COMMAND_LINE_PROPERTY_SOURCE_NAME, "defaultProperties" };
|
||||
@@ -139,7 +138,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 +150,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<>();
|
||||
|
||||
@@ -41,6 +41,8 @@ import static org.springframework.cloud.util.PropertyUtils.BOOTSTRAP_ENABLED_PRO
|
||||
*/
|
||||
public class LegacyContextRefresher extends ContextRefresher {
|
||||
|
||||
private static final String REFRESH_ARGS_PROPERTY_SOURCE = "refreshArgs";
|
||||
|
||||
@Deprecated
|
||||
public LegacyContextRefresher(ConfigurableApplicationContext context, RefreshScope scope) {
|
||||
super(context, scope);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-loadbalancer</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-starter</artifactId>
|
||||
<name>spring-cloud-starter</name>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons-parent</artifactId>
|
||||
<version>4.1.5-SNAPSHOT</version>
|
||||
<version>4.1.6-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>
|
||||
|
||||
Reference in New Issue
Block a user