作者 钟来

修改验证码bug

@@ -58,8 +58,13 @@ @@ -58,8 +58,13 @@
58 <dependency> 58 <dependency>
59 <groupId>com.aliyun</groupId> 59 <groupId>com.aliyun</groupId>
60 <artifactId>alibabacloud-dysmsapi20170525</artifactId> 60 <artifactId>alibabacloud-dysmsapi20170525</artifactId>
  61 + <exclusions>
  62 + <exclusion>
  63 + <groupId>org.apache.httpcomponents.client5</groupId>
  64 + <artifactId>httpclient5</artifactId>
  65 + </exclusion>
  66 + </exclusions>
61 </dependency> 67 </dependency>
62 -  
63 <dependency> 68 <dependency>
64 <groupId>org.aspectj</groupId> 69 <groupId>org.aspectj</groupId>
65 <artifactId>aspectjweaver</artifactId> 70 <artifactId>aspectjweaver</artifactId>
@@ -75,6 +80,12 @@ @@ -75,6 +80,12 @@
75 <artifactId>mysql-connector-java</artifactId> 80 <artifactId>mysql-connector-java</artifactId>
76 </dependency> 81 </dependency>
77 82
  83 + <dependency>
  84 + <groupId>org.apache.httpcomponents.client5</groupId>
  85 + <artifactId>httpclient5</artifactId>
  86 + <version>5.1.3</version>
  87 + </dependency>
  88 +
78 </dependencies> 89 </dependencies>
79 90
80 <build> 91 <build>
@@ -58,6 +58,7 @@ public class LoginController extends BaseController { @@ -58,6 +58,7 @@ public class LoginController extends BaseController {
58 logger.info(GsonConstructor.get().toJson(resp)); 58 logger.info(GsonConstructor.get().toJson(resp));
59 } 59 }
60 } catch (Exception e) { 60 } catch (Exception e) {
  61 + logger.error("验证码发送错误",e);
61 // TODO 处理异常 62 // TODO 处理异常
62 return AjaxResult.error( "验证码发送错误,请联想管理员"); 63 return AjaxResult.error( "验证码发送错误,请联想管理员");
63 } 64 }
@@ -12,12 +12,12 @@ import java.util.concurrent.CompletableFuture; @@ -12,12 +12,12 @@ import java.util.concurrent.CompletableFuture;
12 import java.util.concurrent.ExecutionException; 12 import java.util.concurrent.ExecutionException;
13 13
14 public class AlibabacloudUtil { 14 public class AlibabacloudUtil {
15 - private static String appKey = "23389543";  
16 - private static String appSecret ="5e376702d50d4b575d03309966207a83"; 15 + private static String appKey = "LTAI4GCBdtG2yynzneLiGFdH";
  16 + private static String appSecret ="UQSSRgQYBSQPDFFETq4inFWsF8LO5Z";
17 public static SendSmsResponse sendPhoneSMS(String phone,String code) throws ExecutionException, InterruptedException { 17 public static SendSmsResponse sendPhoneSMS(String phone,String code) throws ExecutionException, InterruptedException {
18 StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder() 18 StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
19 - .accessKeyId(System.getenv("ACCESS_KEY_ID"))  
20 - .accessKeySecret(System.getenv("ACCESS_KEY_SECRET")) 19 + .accessKeyId(appKey)
  20 + .accessKeySecret(appSecret)
21 .build()); 21 .build());
22 // Configure the Client 22 // Configure the Client
23 AsyncClient client = AsyncClient.builder() 23 AsyncClient client = AsyncClient.builder()