37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
import com.cm.manager.sms.config.properties.SmsDefaultProperties;
|
|
import com.cm.manager.sms.utils.DefaultSmsUtil;
|
|
import org.junit.Test;
|
|
|
|
/**
|
|
* When you feel like quitting. Think about why you started
|
|
* 当你想要放弃的时候,想想当初你为何开始
|
|
*
|
|
* @ClassName: SmsTest
|
|
* @Description: 短信测试
|
|
* @Author: WangGeng
|
|
* @Date: 2020/10/20 9:39
|
|
* @Version: 1.0
|
|
**/
|
|
public class SmsTest {
|
|
|
|
@Test
|
|
public void test() {
|
|
// 包头政法 btzfw
|
|
// 西藏日喀则 xzrkz
|
|
String account = "xzrkz";
|
|
String password = "xzrkz123";
|
|
String phone = "15147146676";
|
|
StringBuilder contentSB = new StringBuilder("【山西腾狮科技】").append("测试短信");
|
|
String url = "https://dx.ipyy.net/sms.aspx?action=send&userid=&account={account}&password={password}&mobile={mobile}&content={content}&sendTime=&extno={extno}";
|
|
String[] paramArray = new String[]{
|
|
account,
|
|
password,
|
|
phone,
|
|
contentSB.toString(),
|
|
phone
|
|
};
|
|
DefaultSmsUtil.sendSms(url, paramArray);
|
|
}
|
|
|
|
}
|