|
|
|
@ -9,7 +9,6 @@ import org.codehaus.jackson.map.ObjectMapper;
|
|
|
|
|
import org.codehaus.jackson.type.TypeReference;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
|
import org.springframework.core.ParameterizedTypeReference;
|
|
|
|
|
import org.springframework.http.*;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -17,7 +16,6 @@ import org.springframework.util.LinkedMultiValueMap;
|
|
|
|
|
import org.springframework.util.MultiValueMap;
|
|
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.lang.reflect.Type;
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
@ -28,34 +26,27 @@ import java.util.UUID;
|
|
|
|
|
@Service
|
|
|
|
|
public class MessagingConnector {
|
|
|
|
|
|
|
|
|
|
public RestTemplate restTemplate;
|
|
|
|
|
private final RestTemplate restTemplate;
|
|
|
|
|
|
|
|
|
|
private String sms;
|
|
|
|
|
private final MessageSendServiceDsl messageSendServiceDsl;
|
|
|
|
|
|
|
|
|
|
private String lms;
|
|
|
|
|
private final String sms;
|
|
|
|
|
|
|
|
|
|
private String mms;
|
|
|
|
|
private final String lms;
|
|
|
|
|
|
|
|
|
|
private String kakao;
|
|
|
|
|
private final String mms;
|
|
|
|
|
|
|
|
|
|
private String apiKey;
|
|
|
|
|
private final String kakao;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ApplicationContext applicationContext;
|
|
|
|
|
private final String apiKey;
|
|
|
|
|
|
|
|
|
|
private MessageSendServiceDsl messageSendServiceDsl;
|
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
|
|
public void init() {
|
|
|
|
|
this.messageSendServiceDsl = applicationContext.getBean(MessageSendServiceDsl.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public MessagingConnector(String sms, String lms,String mms,String kakao,String apiKey){
|
|
|
|
|
public MessagingConnector(String sms, String lms,String mms,String kakao,String apiKey, MessageSendServiceDsl messageSendServiceDsl){
|
|
|
|
|
this.sms = sms;
|
|
|
|
|
this.lms = lms;
|
|
|
|
|
this.mms = mms;
|
|
|
|
|
this.kakao = kakao;
|
|
|
|
|
this.apiKey = apiKey;
|
|
|
|
|
this.messageSendServiceDsl = messageSendServiceDsl;
|
|
|
|
|
this.restTemplate = new RestTemplate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|