了解 Spring 管理服务器的不同客户端类型

Understand different client types of Spring Admin Server

我正在从事 spring 云微服务项目,我想实施管理服务器。我找到了两种实现类型,第一种是使用admin client对每个微服务的依赖,然后配置服务与admin server连接,第二种是将admin server注册到eureka来获取其他服务而不做任何事情在这些服务中..

这两种实现有什么区别?微服务架构推荐使用哪一个?

如果您已经在使用 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.