diff options
Diffstat (limited to 'core/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/common/EnvProperties.java')
-rw-r--r-- | core/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/common/EnvProperties.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/core/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/common/EnvProperties.java b/core/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/common/EnvProperties.java index 0dca28427..463191fb2 100644 --- a/core/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/common/EnvProperties.java +++ b/core/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/common/EnvProperties.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * onap + * ================================================================================ + * Copyright (C) 2021 AT&T + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.ccsdk.sli.core.utils.common; import java.io.IOException; @@ -8,6 +28,17 @@ import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * Drop-in replacement for java.util.Properties that allows env + * variables to be used as settings for property files. For example, + * + * my.property = ${MY_PROPERTY} + * + * A default value can also be provided using :- notation. For example, + * + * my.property = ${MY_PROPERTY:-defaultValue} + */ + public class EnvProperties extends Properties { @Override |