From a9b4d440c53228ebdf8bf396303858d25c6db0c9 Mon Sep 17 00:00:00 2001
From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com>
Date: Tue, 13 Jun 2023 17:18:49 -0400
Subject: [PATCH 1/2] Upgrading spring-cloud-deployer version. Only used for
tests
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 5096a6f7..e11693ca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
3.1.3-SNAPSHOT
3.1.7-SNAPSHOT
3.1.8-SNAPSHOT
- 1.0.3.RELEASE
+ 2.8.3
3.1.8-SNAPSHOT
3.2.9-SNAPSHOT
1.17.6
From 336877934f1ef32df46c4343f21ef2f674a6ff5d Mon Sep 17 00:00:00 2001
From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com>
Date: Thu, 15 Jun 2023 08:53:16 -0400
Subject: [PATCH 2/2] Create ConsulFunction properly to avoid
ClassNotFoundException
---
.../configclient/ConsulConfigServerBootstrapper.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/spring-cloud-consul-discovery/src/main/java/org/springframework/cloud/consul/discovery/configclient/ConsulConfigServerBootstrapper.java b/spring-cloud-consul-discovery/src/main/java/org/springframework/cloud/consul/discovery/configclient/ConsulConfigServerBootstrapper.java
index 725537c9..5debe875 100644
--- a/spring-cloud-consul-discovery/src/main/java/org/springframework/cloud/consul/discovery/configclient/ConsulConfigServerBootstrapper.java
+++ b/spring-cloud-consul-discovery/src/main/java/org/springframework/cloud/consul/discovery/configclient/ConsulConfigServerBootstrapper.java
@@ -93,7 +93,7 @@ public class ConsulConfigServerBootstrapper implements BootstrapRegistryInitiali
// ConfigServerInstanceProvider.Function
// which would result in a ClassNotFoundException when Spring Cloud Config is not
// on the classpath
- registry.registerIfAbsent(ConfigServerInstanceProvider.Function.class, ConsulFunction::new);
+ registry.registerIfAbsent(ConfigServerInstanceProvider.Function.class, ConsulFunction::create);
}
private BindHandler getBindHandler(org.springframework.boot.BootstrapContext context) {
@@ -126,6 +126,10 @@ public class ConsulConfigServerBootstrapper implements BootstrapRegistryInitiali
this.context = context;
}
+ public static ConsulFunction create(BootstrapContext context) {
+ return new ConsulFunction(context);
+ }
+
@Override
public List apply(String serviceId) {
return apply(serviceId, null, null, null);