This commit is contained in:
王文艳
2026-06-01 15:16:18 +08:00
parent d5ac4baa1d
commit 3d944d5f67
3 changed files with 15 additions and 4 deletions
+2 -2
View File
@@ -33,12 +33,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
+11
View File
@@ -170,5 +170,16 @@
<version>0.1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- 强制统一 SLF4J 版本,避免 CXF 2.2.3 引入旧版 slf4j-api 与 nacos-client 的 jcl-over-slf4j 1.7.x 冲突 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
</dependencies>
</project>
@@ -479,7 +479,7 @@ public class OpenApiClient {
public static JSONObject addressStandard(String city, String address) {
if (StringUtils.isBlank(city) || StringUtils.isBlank(address)) {
if (StringUtils.isBlank(address)) {
throw new IllegalArgumentException();
}
@@ -488,7 +488,7 @@ public class OpenApiClient {
params.put("city", city);
params.put("address", address);
params.put("token", TOKEN);
String content = new HttpRequest().get("http://open.fangjia.com/address/standard", params, "utf-8")
String content = new HttpRequest().get("http://open.fangjia.com/addrSvc/structure", params, "utf-8")
JSONObject result = JSONObject.fromObject(content)
if (result.getInt("code") == 200) {
return result.getJSONObject("result");