fix bug
This commit is contained in:
@@ -33,12 +33,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>1.6.1</version>
|
<version>1.7.25</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
<version>1.6.1</version>
|
<version>1.7.25</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.testng</groupId>
|
<groupId>org.testng</groupId>
|
||||||
|
|||||||
@@ -170,5 +170,16 @@
|
|||||||
<version>0.1.0-SNAPSHOT</version>
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</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>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
+2
-2
@@ -479,7 +479,7 @@ public class OpenApiClient {
|
|||||||
|
|
||||||
|
|
||||||
public static JSONObject addressStandard(String city, String address) {
|
public static JSONObject addressStandard(String city, String address) {
|
||||||
if (StringUtils.isBlank(city) || StringUtils.isBlank(address)) {
|
if (StringUtils.isBlank(address)) {
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -488,7 +488,7 @@ public class OpenApiClient {
|
|||||||
params.put("city", city);
|
params.put("city", city);
|
||||||
params.put("address", address);
|
params.put("address", address);
|
||||||
params.put("token", TOKEN);
|
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)
|
JSONObject result = JSONObject.fromObject(content)
|
||||||
if (result.getInt("code") == 200) {
|
if (result.getInt("code") == 200) {
|
||||||
return result.getJSONObject("result");
|
return result.getJSONObject("result");
|
||||||
|
|||||||
Reference in New Issue
Block a user