提交代码

master
胡锐 4 days ago
parent e4ea430426
commit 48a128be6a
  1. 2
      cweb/src/main/java/com/hfkj/controller/SmsController.java
  2. 6
      service/pom.xml
  3. 26
      service/src/main/java/com/hfkj/platform/aliyun/config/AliyunConfig.java

File diff suppressed because one or more lines are too long

@ -290,6 +290,12 @@
<version>1.0.1</version> <version>1.0.1</version>
<systemPath>${basedir}/lib/pop-sdk-1.18.23-all.jar</systemPath> <systemPath>${basedir}/lib/pop-sdk-1.18.23-all.jar</systemPath>
</dependency> </dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>dysmsapi20170525</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<resources> <resources>

@ -0,0 +1,26 @@
package com.hfkj.platform.aliyun.config;
import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.teaopenapi.models.Config;
/**
* @className: AliyunConfig
* @author: HuRui
* @date: 2024/11/1
**/
public class AliyunConfig {
/**
* 构建客户端
* @return
* @throws Exception
*/
public static Client createClient() throws Exception {
Config config = new Config()
.setAccessKeyId("LTAI5tHpe3pnXx6CKLaHkq16")
.setAccessKeySecret("rPN29MiECptHl3IhHVWl4fR8KJYhXj");
// 配置 Endpoint
config.endpoint = "dysmsapi.aliyuncs.com";
return new Client(config);
}
}
Loading…
Cancel
Save