WANG 6 år sedan
förälder
incheckning
6721305cf7

+ 8 - 0
examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/upyun/UpYunClient.java

@@ -141,7 +141,10 @@ public class UpYunClient {
 		HttpPut httpPut = new HttpPut(url);
 		httpPut.setConfig(this.requestConfig);
 		CloseableHttpResponse response = null;
+
+		long s = System.currentTimeMillis();
 		try {
+
 			String date = getGMTDate();
 			httpPut.addHeader(DATE, date);
 
@@ -170,6 +173,11 @@ public class UpYunClient {
 			httpPut.releaseConnection();
 		}
 
+		if (log.isDebugEnabled()) {
+			log.debug("[upyun]. path=" + path + "; cost " + (System.currentTimeMillis() - s)
+					+ " ms.");
+		}
+
 		String fileUrl = "http://" + bucketName + ".b0.upaiyun.com" + filePath;
 		return fileUrl;
 	}

+ 1 - 1
examcloud-exchange-starter/src/main/resources/application-dev.properties

@@ -25,4 +25,4 @@ $upyun.site.2.bucketName=exam-cloud-test
 $upyun.site.2.userName=examcloud
 $upyun.site.2.password=ecs87863577!@#
 
-$upyun.testUrl=localhost:8000
+$upyun.testUrl=http://127.0.0.1:8000