anderx лет назад: 7
Родитель
Сommit
3e56d75221
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

+ 5 - 4
src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

@@ -20,7 +20,8 @@ public class MobileMessageUtils {
 
 		IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKey, accessSecret);
 		try {
-			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
+			throw new ClientException("短信异常");
+/*			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
 			IAcsClient acsClient = new DefaultAcsClient(profile);
 			// 组装请求对象
 			SendSmsRequest request = new SendSmsRequest();
@@ -41,12 +42,12 @@ public class MobileMessageUtils {
 			// request.setOutId("yourOutId");
 			// 请求失败这里会抛ClientException异常
 			SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
-		} catch (ClientException e) {
+*/		} catch (ClientException e) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e, CLIENT_EXCEPTION, e.getMessage());
 			e.printStackTrace();
 			return "短信异常!";
-		}
-		return null;
+		}		
+//		return null;
 	}
 
 }