From 2497900d3edbc015f4e1dbf92b369889bb0f7dbc Mon Sep 17 00:00:00 2001 From: spencergibb Date: Fri, 5 Aug 2022 16:29:25 -0400 Subject: [PATCH 1/2] Removes compile dependency on config server. Configures duplicate-finder-maven-plugin to ignore tests. --- pom.xml | 1 + spring-cloud-netflix-eureka-client/pom.xml | 2 +- .../EurekaClientConfigServerAutoConfiguration.java | 13 +++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 48a2c43c4..a87e7d1dc 100644 --- a/pom.xml +++ b/pom.xml @@ -81,6 +81,7 @@ plugin.properties mozilla/public-suffix-list.txt + false diff --git a/spring-cloud-netflix-eureka-client/pom.xml b/spring-cloud-netflix-eureka-client/pom.xml index 4cc0d3545..74aec5f0d 100644 --- a/spring-cloud-netflix-eureka-client/pom.xml +++ b/spring-cloud-netflix-eureka-client/pom.xml @@ -40,7 +40,7 @@ org.springframework.cloud spring-cloud-config-server - true + test org.springframework.cloud diff --git a/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/config/EurekaClientConfigServerAutoConfiguration.java b/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/config/EurekaClientConfigServerAutoConfiguration.java index aed00cb52..34555cf05 100644 --- a/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/config/EurekaClientConfigServerAutoConfiguration.java +++ b/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/config/EurekaClientConfigServerAutoConfiguration.java @@ -24,9 +24,9 @@ import com.netflix.discovery.EurekaClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.cloud.config.server.config.ConfigServerProperties; import org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; import org.springframework.util.StringUtils; /** @@ -36,21 +36,22 @@ import org.springframework.util.StringUtils; */ @Configuration(proxyBeanMethods = false) @EnableConfigurationProperties -@ConditionalOnClass({ EurekaInstanceConfigBean.class, EurekaClient.class, ConfigServerProperties.class }) +@ConditionalOnClass(value = { EurekaInstanceConfigBean.class, EurekaClient.class }, + name = "org.springframework.cloud.config.server.config.ConfigServerProperties") public class EurekaClientConfigServerAutoConfiguration { @Autowired(required = false) private EurekaInstanceConfig instance; - @Autowired(required = false) - private ConfigServerProperties server; + @Autowired + private Environment env; @PostConstruct public void init() { - if (this.instance == null || this.server == null) { + if (this.instance == null) { return; } - String prefix = this.server.getPrefix(); + String prefix = this.env.getProperty("spring.cloud.config.server.prefix"); if (StringUtils.hasText(prefix) && !StringUtils.hasText(this.instance.getMetadataMap().get("configPath"))) { this.instance.getMetadataMap().put("configPath", prefix); } From 20a3671055a77ad78d6d5534341692bf4eae2521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilius=20=C5=A0umskas?= Date: Wed, 31 Aug 2022 12:42:26 +0300 Subject: [PATCH 2/2] Fix CSS and JS on Eureka Dashboard (#4096) * Fix CSS and JS on Eureka Dashboard The dashboard interface was broken after changes in https://github.com/spring-cloud/spring-cloud-netflix/pull/4075. Bootstrap has changed a lot since version 3. This patch converts dashboard's CSS to Bootstrap v.5 API. Also, remove unnecessary JavaScript. Table striping and tab activation is done completely in Bootstrap now. While at it, remove IE support. It is not supported in Bootstrap v.5 anymore. * Fix dashboard navigation tests --- .../resources/templates/eureka/header.ftlh | 27 ++++------ .../resources/templates/eureka/lastn.ftlh | 27 ++++------ .../resources/templates/eureka/navbar.ftlh | 2 +- .../resources/templates/eureka/status.ftlh | 18 +++---- .../src/main/wro/header.css | 53 +++++-------------- .../src/main/wro/main.css | 12 +++-- .../src/main/wro/responsive.css | 11 ---- .../server/ApplicationDashboardPathTests.java | 4 +- 8 files changed, 52 insertions(+), 102 deletions(-) diff --git a/spring-cloud-netflix-eureka-server/src/main/resources/templates/eureka/header.ftlh b/spring-cloud-netflix-eureka-server/src/main/resources/templates/eureka/header.ftlh index b1be17c2e..dff804402 100644 --- a/spring-cloud-netflix-eureka-server/src/main/resources/templates/eureka/header.ftlh +++ b/spring-cloud-netflix-eureka-server/src/main/resources/templates/eureka/header.ftlh @@ -1,22 +1,17 @@ <#import "/spring.ftl" as spring /> -