application.properties java에서 읽기
properties에 정의한 값 java에서 읽어오기
#--------------------------------------------------------------
# application.properties
#--------------------------------------------------------------
kakao.tokenTitle = authToken
kakao.serverNameTitle = serverName
kakao.domain = https://***.***.com
kakao.url = /request/kakao.json
kakao.token = **3g==
kakao.serverName = shinhan
kakao.SMSTemplate = ***
kakao.service = ***
#----------------------------------------------------------------------
//KakaoSMSConfig.java file
@Data
@Configuration
@ConfigurationProperties(prefix="kakao")
public class KakaoSMSConfig {
private String tokenTitle;
private String serverNameTitle;
private String domain;
private String url;
private String token;
private String serverName;
private String SMSTemplate;
private Integer service;
private String SMSText;
private String SMSNumber;
}