mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
polish #761 update pkg name & maven coordinate for Greenwich
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.cloud.alibaba.cloud.example;
|
||||
package com.alibaba.cloud.example;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -24,7 +24,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@SpringBootApplication
|
||||
public class SmsApplication {
|
||||
|
||||
public static void main(String[] args) throws Exception{
|
||||
public static void main(String[] args) throws Exception {
|
||||
SpringApplication.run(SmsApplication.class, args);
|
||||
}
|
||||
}
|
@@ -1,17 +1,23 @@
|
||||
package org.springframework.cloud.alibaba.cloud.example;
|
||||
package com.alibaba.cloud.example;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.alicloud.sms.ISmsService;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.alibaba.alicloud.sms.ISmsService;
|
||||
|
||||
import com.aliyun.mns.model.Message;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.*;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendBatchSmsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendBatchSmsResponse;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.http.MethodType;
|
||||
|
||||
@@ -28,7 +34,7 @@ public class SmsController {
|
||||
private SmsReportMessageListener smsReportMessageListener;
|
||||
|
||||
@GetMapping("/report-queue.do")
|
||||
public String getSmsReportQueuename(){
|
||||
public String getSmsReportQueuename() {
|
||||
|
||||
return environment.getProperty("spring.cloud.alicloud.sms.up-queue-name");
|
||||
}
|
@@ -1,17 +1,18 @@
|
||||
package org.springframework.cloud.alibaba.cloud.example;
|
||||
|
||||
import com.aliyun.mns.model.Message;
|
||||
import org.springframework.stereotype.Component;
|
||||
package com.alibaba.cloud.example;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.aliyun.mns.model.Message;
|
||||
|
||||
/**
|
||||
* @author 如果需要监听短信是否被对方成功接收,只需实现这个接口并初始化一个 Spring Bean 即可。
|
||||
*/
|
||||
@Component
|
||||
public class SmsReportMessageListener
|
||||
implements org.springframework.cloud.alicloud.sms.SmsReportMessageListener {
|
||||
implements com.alibaba.alicloud.sms.SmsReportMessageListener {
|
||||
private List<Message> smsReportMessageSet = new LinkedList<>();
|
||||
|
||||
@Override
|
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.alibaba.cloud.example;
|
||||
package com.alibaba.cloud.example;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.aliyun.mns.model.Message;
|
||||
*/
|
||||
@Component
|
||||
public class SmsUpMessageListener
|
||||
implements org.springframework.cloud.alicloud.sms.SmsUpMessageListener {
|
||||
implements com.alibaba.alicloud.sms.SmsUpMessageListener {
|
||||
|
||||
@Override
|
||||
public boolean dealMessage(Message message) {
|
Reference in New Issue
Block a user