public class PropertyReaderHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
determineFilePathFromPackageName(Class<?> clazz)
Determine file path from package name creates from class package instance
the file path equivalent.
|
static List<String> |
get(org.springframework.core.env.Environment env,
String propName)
Lookup in
Environment a certain property or a list of properties. |
static <T> void |
setIfPresent(org.springframework.core.env.Environment env,
String key,
Class<T> type,
java.util.function.Consumer<T> function)
Load from
Environment a key with a given type. |
public static List<String> get(org.springframework.core.env.Environment env, String propName)
Environment a certain property or a list of properties.env - the Environment context from which topropName - the name of the property to lookup from Environment.public static <T> void setIfPresent(org.springframework.core.env.Environment env,
String key,
Class<T> type,
java.util.function.Consumer<T> function)
Environment a key with a given type. If sucj key is
present supply it in Consumer.T - the generic typeenv - the envkey - the keytype - the typefunction - the functionpublic static final String determineFilePathFromPackageName(Class<?> clazz)
Copyright © 2018. All rights reserved.