1.  pom.xml 加入

	    
        
            io.zipkin.java
            zipkin-server
            2.12.3
            
                
                    org.apache.logging.log4j
    				log4j-slf4j-impl
                
            
        
        
            io.zipkin.java
            zipkin-autoconfigure-ui
            2.12.3
        
        
            io.zipkin.java
            zipkin-autoconfigure-collector-kafka
            2.12.9
        
        
            io.zipkin.java
            zipkin-autoconfigure-storage-elasticsearch-http
            2.8.4
        
        

2. application.properties 配置文件

spring.application.name=fhcloud-zipkin-serverserver.port=8003#开启安全认证 用户名和密码spring.security.basic.enabled=truespring.security.user.name=adminspring.security.user.password=root#指向注册中心eureka.instance.leaseRenewalIntervalInSeconds=10eureka.client.registryFetchIntervalSeconds=5eureka.client.serviceUrl.defaultZone=http://127.0.0.1:8761/eureka/,http://127.0.0.1:8762/eureka/#actuator配置management.endpoints.web.exposure.include=*management.endpoints.web.exposure.exclude=env,beansmanagement.security.enabled=falsemanagement.metrics.web.server.auto-time-requests=fals

3. 启动类 FHmainApplication.java

package org.fh;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.cloud.netflix.eureka.EnableEurekaClient;import zipkin2.server.internal.EnableZipkinServer;/**
 * 说明:启动类 
 * www.1b23.com
 */@SpringBootApplication@EnableEurekaClient@EnableZipkinServerpublic class FHmainApplication {	public static void main(String[] args) {
		SpringApplication.run(FHmainApplication.class, args);
	}
	
}