javaspringspring-bootspring-cloudspring-boot-admin

Understand different client types of Spring Admin Server


I m working on a spring cloud microservices project and i want to implement the admin server. I found two implementations types, the first one is using the dependency of admin client on each microservice and then configure the service to connect with the admin server, and the second one is just registering the admin server to eureka to fetch other services without doing anything in those services..

What is the difference between the two implementations? and which one is recommended with microservices architecture?


Solution

  • If you are already using Spring Cloud Service Discovery (e.g. with Eureka or Consul), then there is no need to use the Spring Boot Admin client as described in section "Registering Client Applications" of the reference documentation:

    If you already use Spring Cloud Discovery for your applications you don’t need the SBA Client. Just add a DiscoveryClient to Spring Boot Admin Server, the rest is done by our AutoConfiguration.