| | |
| | | |
| | | public class SmsUtils { |
| | | @Value("${sms.url}") |
| | | private String url="http://103.21.119.249:3131/http/send.aspx"; |
| | | //外网 |
| | | // private String url="http://103.21.119.249:3131/http/send.aspx"; |
| | | //内网 |
| | | private String url="http://192.168.111.9:9096/http/send.aspx"; |
| | | @Value("${sms.loginName}") |
| | | private String loginName="qddxfsyy"; |
| | | @Value("${sms.passWord}") |
| | |
| | | "\"Key\":\""+key+"\"," + |
| | | "\"Tel\":\""+tel+"\",\"MessageContent\":\""+messageContent+"\"}"; |
| | | String result=""; |
| | | result= HttpUtils.sendPost(url, Base64.getEncoder().encodeToString(content.getBytes()) ); |
| | | byte[] bytesToEncode = content.getBytes(java.nio.charset.StandardCharsets.UTF_8); |
| | | result= HttpUtils.sendPost(url, Base64.getEncoder().encodeToString(bytesToEncode) ); |
| | | |
| | | return result; |
| | | } |