java spring boot
spring boot > @value static 설정시 변경사항
2pie
2023. 2. 25. 20:25
반응형
#spring boot 에서 static가 아닌 경우
@Value("${g2b.receiveUrl}")
private String receiveUrl;
#spring boot 에서 static인 경우
public static String receiveUrl;
@Value("${g2b.receiveUrl}")
public void setReceiveUrl(String receiveUrl) {
BidApi.receiveUrl = receiveUrl;
}
반응형