作者 钟来

修改验证码bug

... ... @@ -58,8 +58,13 @@
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>alibabacloud-dysmsapi20170525</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
... ... @@ -75,6 +80,12 @@
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.1.3</version>
</dependency>
</dependencies>
<build>
... ...
... ... @@ -58,6 +58,7 @@ public class LoginController extends BaseController {
logger.info(GsonConstructor.get().toJson(resp));
}
} catch (Exception e) {
logger.error("验证码发送错误",e);
// TODO 处理异常
return AjaxResult.error( "验证码发送错误,请联想管理员");
}
... ...
... ... @@ -12,12 +12,12 @@ import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
public class AlibabacloudUtil {
private static String appKey = "23389543";
private static String appSecret ="5e376702d50d4b575d03309966207a83";
private static String appKey = "LTAI4GCBdtG2yynzneLiGFdH";
private static String appSecret ="UQSSRgQYBSQPDFFETq4inFWsF8LO5Z";
public static SendSmsResponse sendPhoneSMS(String phone,String code) throws ExecutionException, InterruptedException {
StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
.accessKeyId(System.getenv("ACCESS_KEY_ID"))
.accessKeySecret(System.getenv("ACCESS_KEY_SECRET"))
.accessKeyId(appKey)
.accessKeySecret(appSecret)
.build());
// Configure the Client
AsyncClient client = AsyncClient.builder()
... ...