From 4986a673e01945e2f9c79192c851a11a3543e29f Mon Sep 17 00:00:00 2001 From: Chris Phillipson Date: Mon, 7 Jun 2021 07:02:21 -0700 Subject: [PATCH] Upgrade to Vaadin 20 and fix issue with service registration at boot * Upgrade to latest available plugin and dependency versions * Move properties from bootstrap.yml to application.yml * Add caffeine as backing cache provider for client-side load-balancer * Adjust logging levels to provide insight into DiscoveryClient bootstrap * Fix activation of cloud profile --- pom.xml | 15 ++++++++++----- src/main/resources/application.yml | 17 ++++++++++++++++- src/main/resources/bootstrap.yml | 8 -------- src/main/resources/log4j2-spring.xml | 6 ++++-- 4 files changed, 30 insertions(+), 16 deletions(-) delete mode 100644 src/main/resources/bootstrap.yml diff --git a/pom.xml b/pom.xml index 411192a..70b211b 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ UTF-8 ${java.version} ${java.version} - 19.0.8 + 20.0.1 1.18.20 @@ -84,12 +84,12 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 - 2.12.2 + 2.12.3 com.fasterxml.jackson.core jackson-annotations - 2.12.2 + 2.12.3 org.springframework.boot @@ -158,6 +158,11 @@ resilience4j-annotations 1.7.0 + + com.github.ben-manes.caffeine + caffeine + 3.0.2 + com.vaadin @@ -216,7 +221,7 @@ org.springframework.cloud spring-cloud-dependencies - 2020.0.2 + 2020.0.3 import pom @@ -321,7 +326,7 @@ org.jacoco jacoco-maven-plugin - 0.8.6 + 0.8.7 before-unit-test-execution diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 4afbec1..73412d6 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,11 +1,20 @@ spring: + application: + name: cf-hoover-ui codec: max-in-memory-size: 512000000 cloud: + discovery: + enabled: false loadbalancer: ribbon: enabled: false +eureka: + client: + serviceUrl: + defaultZone: ${vcap.services.hooverRegistry.credentials.uri:http://localhost:8761}/eureka/ + management: endpoints: web: @@ -24,7 +33,13 @@ cron: --- spring: - profiles: cloud + config: + activate: + on-profile: cloud + + cloud: + discovery: + enabled: true management: cloudfoundry: diff --git a/src/main/resources/bootstrap.yml b/src/main/resources/bootstrap.yml deleted file mode 100644 index 0ce0a92..0000000 --- a/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,8 +0,0 @@ -spring: - application: - name: cf-hoover-ui - -eureka: - client: - serviceUrl: - defaultZone: ${vcap.services.hooverRegistry.credentials.uri:http://localhost:8761}/eureka/ diff --git a/src/main/resources/log4j2-spring.xml b/src/main/resources/log4j2-spring.xml index 272450e..0a38bb4 100644 --- a/src/main/resources/log4j2-spring.xml +++ b/src/main/resources/log4j2-spring.xml @@ -29,10 +29,12 @@ - + +