From f39563d4b86e792fb9204fc2b2e737897d11e909 Mon Sep 17 00:00:00 2001
From: DongZeLiang <2746733890@qq.com>
Date: Thu, 11 Apr 2024 10:50:11 +0800
Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E5=BE=B7API?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
muyu-common/muyu-common-core/pom.xml | 5 ++++
muyu-modules/muyu-system/pom.xml | 5 ++++
.../com/muyu/system/forest/api/TestApi.java | 15 +++++++++++
.../muyu/system/forest/gaode/GaoDeApi.java | 9 +++++++
.../src/test/java/com/forest/FoRestTest.java | 27 +++++++++++++++++++
pom.xml | 10 ++++++-
6 files changed, 70 insertions(+), 1 deletion(-)
create mode 100644 muyu-modules/muyu-system/src/main/java/com/muyu/system/forest/api/TestApi.java
create mode 100644 muyu-modules/muyu-system/src/main/java/com/muyu/system/forest/gaode/GaoDeApi.java
create mode 100644 muyu-modules/muyu-system/src/test/java/com/forest/FoRestTest.java
diff --git a/muyu-common/muyu-common-core/pom.xml b/muyu-common/muyu-common-core/pom.xml
index d7ff491..11a5fef 100644
--- a/muyu-common/muyu-common-core/pom.xml
+++ b/muyu-common/muyu-common-core/pom.xml
@@ -136,6 +136,11 @@
lombok
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
diff --git a/muyu-modules/muyu-system/pom.xml b/muyu-modules/muyu-system/pom.xml
index be58498..b572e0e 100644
--- a/muyu-modules/muyu-system/pom.xml
+++ b/muyu-modules/muyu-system/pom.xml
@@ -78,6 +78,11 @@
muyu-common-swagger
+
+ com.dtflys.forest
+ forest-spring-boot-starter
+
+
diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/forest/api/TestApi.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/forest/api/TestApi.java
new file mode 100644
index 0000000..c0c52cf
--- /dev/null
+++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/forest/api/TestApi.java
@@ -0,0 +1,15 @@
+package com.muyu.system.forest.api;
+
+import com.dtflys.forest.annotation.Get;
+
+/**
+ * @author DongZl
+ * @description: 测试
+ * @Date 2024/4/11 上午10:34
+ */
+public interface TestApi {
+
+
+ @Get("https://restapi.amap.com/v3/config/district?keywords=中国&subdistrict=3&key=9d17aa33a6d6d32bd34944f0d8ae60cf")
+ public String test();
+}
diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/forest/gaode/GaoDeApi.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/forest/gaode/GaoDeApi.java
new file mode 100644
index 0000000..4f4993d
--- /dev/null
+++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/forest/gaode/GaoDeApi.java
@@ -0,0 +1,9 @@
+package com.muyu.system.forest.gaode;
+
+/**
+ * @author DongZl
+ * @description: 高德地图接口
+ * @Date 2024/4/11 上午10:49
+ */
+public interface GaoDeApi {
+}
diff --git a/muyu-modules/muyu-system/src/test/java/com/forest/FoRestTest.java b/muyu-modules/muyu-system/src/test/java/com/forest/FoRestTest.java
new file mode 100644
index 0000000..8f0c710
--- /dev/null
+++ b/muyu-modules/muyu-system/src/test/java/com/forest/FoRestTest.java
@@ -0,0 +1,27 @@
+package com.forest;
+
+import com.muyu.system.MuYuSystemApplication;
+import com.muyu.system.forest.api.TestApi;
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+import javax.annotation.Resource;
+
+/**
+ * @author DongZl
+ * @description: 测试
+ * @Date 2024/4/11 上午10:38
+ */
+@SpringBootTest(classes = MuYuSystemApplication.class)
+public class FoRestTest {
+
+ @Resource
+ private TestApi testApi;
+
+ @Test
+ public void testApiGaoDe(){
+ String test = testApi.test();
+ System.out.println(test);
+ }
+
+}
diff --git a/pom.xml b/pom.xml
index 818b6c1..e256d02 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,11 +30,12 @@
3.5.2
2.13.0
2.3
- 2.0.41
+ 2.0.46
0.9.1
8.2.2
4.1.2
2.14.3
+ 1.5.36
@@ -94,6 +95,13 @@
${kaptcha.version}
+
+ com.dtflys.forest
+ forest-spring-boot-starter
+ ${forest.version}
+
+
+
com.github.pagehelper