20250113_9

main
seokjun jeon 2 weeks ago
parent 8e7c404a37
commit 5a45a939a0

@ -9,7 +9,6 @@ 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;
@ -17,7 +16,6 @@ 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,34 +26,27 @@ import java.util.UUID;
@Service @Service
public class MessagingConnector { 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 final String apiKey;
private ApplicationContext applicationContext;
private MessageSendServiceDsl messageSendServiceDsl; public MessagingConnector(String sms, String lms,String mms,String kakao,String apiKey, MessageSendServiceDsl messageSendServiceDsl){
@PostConstruct
public void init() {
this.messageSendServiceDsl = applicationContext.getBean(MessageSendServiceDsl.class);
}
public MessagingConnector(String sms, String lms,String mms,String kakao,String apiKey){
this.sms = sms; this.sms = sms;
this.lms = lms; this.lms = lms;
this.mms = mms; this.mms = mms;
this.kakao = kakao; this.kakao = kakao;
this.apiKey = apiKey; this.apiKey = apiKey;
this.messageSendServiceDsl = messageSendServiceDsl;
this.restTemplate = new RestTemplate(); this.restTemplate = new RestTemplate();
} }

Loading…
Cancel
Save