From 618a39687075c1577472e8439d3c1439562c4b97 Mon Sep 17 00:00:00 2001 From: Marian-Constantin Marica Date: Sun, 17 Nov 2024 14:09:15 -0800 Subject: [PATCH 1/3] Add active health check feature --- .../src/main/resources/application.yml | 2 ++ .../src/main/resources/application.yml | 7 +++++++ .../src/main/resources/application.yml | 7 +++++++ .../src/main/resources/application.yml | 6 ++++++ 4 files changed, 22 insertions(+) diff --git a/spring-petclinic-api-gateway/src/main/resources/application.yml b/spring-petclinic-api-gateway/src/main/resources/application.yml index 48ead7d0f..d8b754ef7 100644 --- a/spring-petclinic-api-gateway/src/main/resources/application.yml +++ b/spring-petclinic-api-gateway/src/main/resources/application.yml @@ -4,6 +4,8 @@ spring: config: import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/} cloud: + loadbalancer: + configurations: health-check gateway: routes: - id: vets-service diff --git a/spring-petclinic-customers-service/src/main/resources/application.yml b/spring-petclinic-customers-service/src/main/resources/application.yml index 7c95adf78..35aed3c6c 100644 --- a/spring-petclinic-customers-service/src/main/resources/application.yml +++ b/spring-petclinic-customers-service/src/main/resources/application.yml @@ -5,6 +5,13 @@ spring: import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/} +management: + endpoints: + web: + exposure: + include: health + + --- spring: config: diff --git a/spring-petclinic-vets-service/src/main/resources/application.yml b/spring-petclinic-vets-service/src/main/resources/application.yml index 983a015db..d25a3b17a 100644 --- a/spring-petclinic-vets-service/src/main/resources/application.yml +++ b/spring-petclinic-vets-service/src/main/resources/application.yml @@ -8,6 +8,13 @@ spring: profiles: active: production +management: + endpoints: + web: + exposure: + include: health + + --- spring: config: diff --git a/spring-petclinic-visits-service/src/main/resources/application.yml b/spring-petclinic-visits-service/src/main/resources/application.yml index ada02194c..c3f1d7c57 100644 --- a/spring-petclinic-visits-service/src/main/resources/application.yml +++ b/spring-petclinic-visits-service/src/main/resources/application.yml @@ -4,6 +4,12 @@ spring: config: import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/} +management: + endpoints: + web: + exposure: + include: health + --- spring: From 6b903b6cbd84e370c3dc3f6458a1010ff760f8a1 Mon Sep 17 00:00:00 2001 From: Marian-Constantin Marica Date: Sun, 17 Nov 2024 15:18:44 -0800 Subject: [PATCH 2/3] Delete redundant property --- .../src/main/resources/application.yml | 7 ------- .../src/main/resources/application.yml | 6 ------ .../src/main/resources/application.yml | 6 ------ 3 files changed, 19 deletions(-) diff --git a/spring-petclinic-customers-service/src/main/resources/application.yml b/spring-petclinic-customers-service/src/main/resources/application.yml index 35aed3c6c..7c95adf78 100644 --- a/spring-petclinic-customers-service/src/main/resources/application.yml +++ b/spring-petclinic-customers-service/src/main/resources/application.yml @@ -5,13 +5,6 @@ spring: import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/} -management: - endpoints: - web: - exposure: - include: health - - --- spring: config: diff --git a/spring-petclinic-vets-service/src/main/resources/application.yml b/spring-petclinic-vets-service/src/main/resources/application.yml index d25a3b17a..c0cbcabcc 100644 --- a/spring-petclinic-vets-service/src/main/resources/application.yml +++ b/spring-petclinic-vets-service/src/main/resources/application.yml @@ -8,12 +8,6 @@ spring: profiles: active: production -management: - endpoints: - web: - exposure: - include: health - --- spring: diff --git a/spring-petclinic-visits-service/src/main/resources/application.yml b/spring-petclinic-visits-service/src/main/resources/application.yml index c3f1d7c57..ada02194c 100644 --- a/spring-petclinic-visits-service/src/main/resources/application.yml +++ b/spring-petclinic-visits-service/src/main/resources/application.yml @@ -4,12 +4,6 @@ spring: config: import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/} -management: - endpoints: - web: - exposure: - include: health - --- spring: From e2c48a1fabc00d0a3ea7cb50cf2e84a90c2418e1 Mon Sep 17 00:00:00 2001 From: Marian-Constantin Marica Date: Sun, 24 Nov 2024 14:22:42 -0800 Subject: [PATCH 3/3] Move the active health check properties to config repository --- spring-petclinic-api-gateway/src/main/resources/application.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/spring-petclinic-api-gateway/src/main/resources/application.yml b/spring-petclinic-api-gateway/src/main/resources/application.yml index d8b754ef7..48ead7d0f 100644 --- a/spring-petclinic-api-gateway/src/main/resources/application.yml +++ b/spring-petclinic-api-gateway/src/main/resources/application.yml @@ -4,8 +4,6 @@ spring: config: import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/} cloud: - loadbalancer: - configurations: health-check gateway: routes: - id: vets-service