public final class PropertyResolvers extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.core.env.PropertyResolver |
newEmptyPropertyResolver()
Creates a new property resolver with no properties.
|
static org.springframework.core.env.PropertyResolver |
newMapPropertyResolver(Map<String,String> m)
Creates a new property resolver that gets properties from the given map.
|
static org.springframework.core.env.PropertyResolver |
newMultiResourcePropertyResolver(boolean allowMissing,
String builtInResourceLocation,
String... customResourceLocations)
Creates a property resolver that pulls from multiple property resource
locations.
|
static org.springframework.core.env.PropertyResolver |
newMultiResourcePropertyResolver(String builtInResourceLocation,
String... customResourceLocations)
Creates a property resolver that pulls from multiple property resource
locations.
|
public static org.springframework.core.env.PropertyResolver newEmptyPropertyResolver()
public static org.springframework.core.env.PropertyResolver newMapPropertyResolver(Map<String,String> m)
m - property mapNullPointerException - if the map is nullpublic static org.springframework.core.env.PropertyResolver newMultiResourcePropertyResolver(String builtInResourceLocation, String... customResourceLocations) throws IOException
builtInResourceLocation - lowest precedence, required resource
location for propertiescustomResourceLocations - additional resource locations for
properties, in increasing order of precedenceIOException - if the built-in resource location could not be loadedNullPointerException - if any resource location is nullpublic static org.springframework.core.env.PropertyResolver newMultiResourcePropertyResolver(boolean allowMissing,
String builtInResourceLocation,
String... customResourceLocations)
throws IOException
allowMissing - true to allow custom resource locations to fail to loadbuiltInResourceLocation - lowest precedence, required resource
location for propertiescustomResourceLocations - additional resource locations for
properties, in increasing order of precedenceIOException - if the built-in resource location could not be loaded,
or if {code}allowMissing{code} is false and any custom resource location
fails to loadNullPointerException - if any resource location is nullCopyright © 2016. All rights reserved.