From a3e6320cb8968d59ad0abe1288530feb733a4002 Mon Sep 17 00:00:00 2001 From: Zoltan Altfatter Date: Tue, 15 May 2018 11:39:16 +0200 Subject: [PATCH] making sure spring-boot-admin can manage the eureka-sever and ignores itself --- eureka-server/pom.xml | 7 ++++++- eureka-server/src/main/resources/application.yml | 15 +++++++++++++-- .../src/main/resources/application.yml | 9 ++++----- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/eureka-server/pom.xml b/eureka-server/pom.xml index da9fb40..e174bc7 100644 --- a/eureka-server/pom.xml +++ b/eureka-server/pom.xml @@ -33,7 +33,12 @@ org.springframework.boot spring-boot-starter-security - + + + org.springframework.boot + spring-boot-starter-actuator + + org.springframework.cloud spring-cloud-starter-netflix-eureka-server diff --git a/eureka-server/src/main/resources/application.yml b/eureka-server/src/main/resources/application.yml index 29ece99..c713bb5 100644 --- a/eureka-server/src/main/resources/application.yml +++ b/eureka-server/src/main/resources/application.yml @@ -11,6 +11,17 @@ spring: # by default every Eureka Server is also an Eureka Client and requires (at least one) service URL to locate a peer. eureka: + instance: + metadata-map: + user.name: ${spring.security.user.name} + user.password: ${spring.security.user.password} client: - register-with-eureka: false - fetch-registry: false \ No newline at end of file + service-url: + defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@localhost:8761/eureka/ + +management: + endpoints: + web.exposure.include: "*" + endpoint: + health: + show-details: ALWAYS diff --git a/spring-boot-admin/src/main/resources/application.yml b/spring-boot-admin/src/main/resources/application.yml index 651ec5b..0255cff 100644 --- a/spring-boot-admin/src/main/resources/application.yml +++ b/spring-boot-admin/src/main/resources/application.yml @@ -7,13 +7,12 @@ spring: user: name: admin password: password + boot: + admin: + discovery: + ignored-services: spring-boot-admin eureka: - instance: - metadata-map: - user.name: ${spring.security.user.name} - user.password: ${spring.security.user.password} - client: service-url: defaultZone: http://eureka:password@localhost:8761/eureka/ \ No newline at end of file