From ae42198a13342ed4f942fed8d35dfe89169060ee Mon Sep 17 00:00:00 2001
From: gtl <2949451835@qq.com>
Date: Sun, 19 May 2024 17:02:14 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E9=93=BE=E8=B7=AF?=
=?UTF-8?q?=E8=BF=BD=E8=B8=AA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-auth/pom.xml | 12 ++++++++++++
ruoyi-auth/src/main/resources/bootstrap.yml | 8 ++++++++
ruoyi-gateway/pom.xml | 13 +++++++++++++
ruoyi-gateway/src/main/resources/bootstrap.yml | 8 ++++++++
ruoyi-modules/ruoyi-system/pom.xml | 12 ++++++++++++
.../ruoyi-system/src/main/resources/bootstrap.yml | 8 ++++++++
6 files changed, 61 insertions(+)
diff --git a/ruoyi-auth/pom.xml b/ruoyi-auth/pom.xml
index 48370ee..7e74408 100644
--- a/ruoyi-auth/pom.xml
+++ b/ruoyi-auth/pom.xml
@@ -52,6 +52,18 @@
muyu-common-security
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-zipkin
+ 2.2.8.RELEASE
+
diff --git a/ruoyi-auth/src/main/resources/bootstrap.yml b/ruoyi-auth/src/main/resources/bootstrap.yml
index 4aadb9d..c607bab 100644
--- a/ruoyi-auth/src/main/resources/bootstrap.yml
+++ b/ruoyi-auth/src/main/resources/bootstrap.yml
@@ -25,3 +25,11 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+ #配置zipkin
+ zipkin:
+ base-url: http://127.0.0.1:9411
+ # 不要让nacos把zipkin注册进去(可以不写)
+ discovery-client-enabled: false
+ sleuth:
+ sampler:
+ probability: 1.0
diff --git a/ruoyi-gateway/pom.xml b/ruoyi-gateway/pom.xml
index a50379b..3fb7268 100644
--- a/ruoyi-gateway/pom.xml
+++ b/ruoyi-gateway/pom.xml
@@ -88,6 +88,19 @@
${swagger.fox.version}
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-zipkin
+ 2.2.8.RELEASE
+
+
diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml
index 1638fc9..fe9c46e 100644
--- a/ruoyi-gateway/src/main/resources/bootstrap.yml
+++ b/ruoyi-gateway/src/main/resources/bootstrap.yml
@@ -41,3 +41,11 @@ spring:
groupId: DEFAULT_GROUP
data-type: json
rule-type: gw-flow
+ #配置zipkin
+ zipkin:
+ base-url: http://127.0.0.1:9411
+ # 不要让nacos把zipkin注册进去(可以不写)
+ discovery-client-enabled: false
+ sleuth:
+ sampler:
+ probability: 1.0
diff --git a/ruoyi-modules/ruoyi-system/pom.xml b/ruoyi-modules/ruoyi-system/pom.xml
index 3e93b98..3b640d4 100644
--- a/ruoyi-modules/ruoyi-system/pom.xml
+++ b/ruoyi-modules/ruoyi-system/pom.xml
@@ -78,6 +78,18 @@
muyu-common-swagger
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-zipkin
+ 2.2.8.RELEASE
+
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
index 64fbd9f..1723722 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml
@@ -25,6 +25,14 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+ #配置zipkin
+ zipkin:
+ base-url: http://127.0.0.1:9411
+ # 不要让nacos把zipkin注册进去(可以不写)
+ discovery-client-enabled: false
+ sleuth:
+ sampler:
+ probability: 1.0
logging:
level:
com.ruoyi.system.mapper: DEBUG