USVT-132 修改可能因为 AWS 没有配置参数而导致的空对象异常
This commit is contained in:
parent
e2c3cac7a8
commit
daa8a96ca7
|
@ -18,6 +18,7 @@ import com.mailgun.api.v3.MailgunMessagesApi;
|
|||
import com.mailgun.client.MailgunClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -79,9 +80,10 @@ public class AwsUtils {
|
|||
|
||||
// Update the map
|
||||
for (Map.Entry<String, String> entry : parameterConfMap.entrySet()) {
|
||||
parameterConfMap.put(entry.getKey(), awsKVMap.get(parameterStorePath + "/" + entry.getKey()).getValue());
|
||||
if (ObjectUtils.isNotEmpty(awsKVMap.get(parameterStorePath + "/" + entry.getKey()))) {
|
||||
parameterConfMap.put(entry.getKey(), awsKVMap.get(parameterStorePath + "/" + entry.getKey()).getValue());
|
||||
}
|
||||
}
|
||||
|
||||
return parameterConfMap;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue