20250113_8

main
seokjun jeon 2 weeks ago
parent 02a9d8544b
commit 8e7c404a37

@ -9,6 +9,7 @@ import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.type.TypeReference; import org.codehaus.jackson.type.TypeReference;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.*; import org.springframework.http.*;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -16,6 +17,7 @@ import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import javax.annotation.PostConstruct;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.time.LocalDate; import java.time.LocalDate;
@ -28,9 +30,6 @@ public class MessagingConnector {
public RestTemplate restTemplate; public RestTemplate restTemplate;
@Autowired
public MessageSendServiceDsl messageSendServiceDsl;
private String sms; private String sms;
private String lms; private String lms;
@ -41,6 +40,16 @@ public class MessagingConnector {
private String apiKey; private String apiKey;
@Autowired
private ApplicationContext applicationContext;
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){
this.sms = sms; this.sms = sms;
this.lms = lms; this.lms = lms;

Loading…
Cancel
Save