Answers for "spring boot eureka management.endpoints.web.exposure.include"

0

spring boot eureka management.endpoints.web.exposure.include

spring:
  application:
    name: spring-boot-admin-sample-eureka
  profiles:
    active:
      - secure


# tag::configuration-eureka[]
eureka:   #<1>
  instance:
    leaseRenewalIntervalInSeconds: 10
    health-check-url-path: /actuator/health
    metadata-map:
      startup: ${random.int}    #needed to trigger info and endpoint update after restart
  client:
    registryFetchIntervalSeconds: 5
    serviceUrl:
      defaultZone: ${EUREKA_SERVICE_URL:http://localhost:8761}/eureka/

management:
  endpoints:
    web:
      exposure:
        include: "*"  #<2>
  endpoint:
    health:
      show-details: ALWAYS
# end::configuration-eureka[]

---
spring:
  profiles: insecure

---
spring:
  profiles: secure
  security:
    user:
      name: "user"
      password: "password"
eureka:
  instance:
    metadata-map:
      user.name: "user"         #These two are needed so that the server
      user.password: "password" #can access the protected client endpoints
Posted by: Guest on October-24-2020

Browse Popular Code Answers by Language