异步消费 整合 elastic-search

This commit is contained in:
wangiegie@gmail.com 2018-01-03 17:22:51 +08:00
parent 2df98cd326
commit 236bf6a917
4 changed files with 22 additions and 9 deletions

View File

@ -63,7 +63,15 @@
<!--zipkin-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
<artifactId>spring-cloud-sleuth-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
</dependencies>

View File

@ -11,11 +11,6 @@ spring:
enabled: true
profile: ${spring.profiles.active}
label: master
zipkin:
base-url: http://localhost:5002
sleuth:
sampler:
percentage: 1.0
---
spring:
profiles: dev

View File

@ -23,13 +23,23 @@
<artifactId>pig-common</artifactId>
<version>${pig.version}</version>
</dependency>
<!--zipkin-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin-stream</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-ui</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
<artifactId>zipkin-autoconfigure-storage-elasticsearch-http</artifactId>
<version>1.28.0</version>
</dependency>
</dependencies>

View File

@ -3,7 +3,7 @@ package com.github.pig.zipkin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import zipkin.server.EnableZipkinServer;
import org.springframework.cloud.sleuth.zipkin.stream.EnableZipkinStreamServer;
/**
* @author lengleng
@ -12,7 +12,7 @@ import zipkin.server.EnableZipkinServer;
*/
@EnableDiscoveryClient
@SpringBootApplication
@EnableZipkinServer
@EnableZipkinStreamServer
public class PigZipkinElkApplication {
public static void main(String[] args) {