高德API

master
DongZeLiang 2024-04-11 10:50:11 +08:00
parent d57a082384
commit f39563d4b8
6 changed files with 70 additions and 1 deletions

View File

@ -136,6 +136,11 @@
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -78,6 +78,11 @@
<artifactId>muyu-common-swagger</artifactId> <artifactId>muyu-common-swagger</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.dtflys.forest</groupId>
<artifactId>forest-spring-boot-starter</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -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();
}

View File

@ -0,0 +1,9 @@
package com.muyu.system.forest.gaode;
/**
* @author DongZl
* @description:
* @Date 2024/4/11 10:49
*/
public interface GaoDeApi {
}

View File

@ -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);
}
}

10
pom.xml
View File

@ -30,11 +30,12 @@
<dynamic-ds.version>3.5.2</dynamic-ds.version> <dynamic-ds.version>3.5.2</dynamic-ds.version>
<commons.io.version>2.13.0</commons.io.version> <commons.io.version>2.13.0</commons.io.version>
<velocity.version>2.3</velocity.version> <velocity.version>2.3</velocity.version>
<fastjson.version>2.0.41</fastjson.version> <fastjson.version>2.0.46</fastjson.version>
<jjwt.version>0.9.1</jjwt.version> <jjwt.version>0.9.1</jjwt.version>
<minio.version>8.2.2</minio.version> <minio.version>8.2.2</minio.version>
<poi.version>4.1.2</poi.version> <poi.version>4.1.2</poi.version>
<transmittable-thread-local.version>2.14.3</transmittable-thread-local.version> <transmittable-thread-local.version>2.14.3</transmittable-thread-local.version>
<forest.version>1.5.36</forest.version>
</properties> </properties>
<!-- 依赖声明 --> <!-- 依赖声明 -->
@ -94,6 +95,13 @@
<version>${kaptcha.version}</version> <version>${kaptcha.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.dtflys.forest</groupId>
<artifactId>forest-spring-boot-starter</artifactId>
<version>${forest.version}</version>
</dependency>
<!-- pagehelper 分页插件 --> <!-- pagehelper 分页插件 -->
<dependency> <dependency>
<groupId>com.github.pagehelper</groupId> <groupId>com.github.pagehelper</groupId>