public class ResourcePropertySource extends PropertiesPropertySource
PropertiesPropertySource that loads a Properties
object from a given Resource or resource location such as
"classpath:/com/myco/foo.properties" or "file:/path/to/file.properties".PropertySource.StubPropertySourceEMPTY_NAMES_ARRAY, loggername, source| Constructor and Description |
|---|
ResourcePropertySource(Resource resource)
Create a PropertySource based on Properties loaded from the given resource.
|
ResourcePropertySource(java.lang.String location)
Create a PropertySource based on Properties loaded from the given resource
location.
|
ResourcePropertySource(java.lang.String location,
java.lang.ClassLoader classLoader)
Create a PropertySource based on Properties loaded from the given resource
location and use the given class loader to load the resource, assuming it is
prefixed with
classpath:. |
ResourcePropertySource(java.lang.String name,
Resource resource)
Create a PropertySource having the given name based on Properties
loaded from the given resource.
|
ResourcePropertySource(java.lang.String name,
java.lang.String location)
Create a PropertySource having the given name based on Properties loaded from
the given resource location.
|
ResourcePropertySource(java.lang.String name,
java.lang.String location,
java.lang.ClassLoader classLoader)
Create a PropertySource having the given name based on Properties loaded from
the given resource location and using the given class loader to load the
resource (assuming it is prefixed with
classpath:). |
getProperty, getPropertyNamescontainsPropertypublic ResourcePropertySource(java.lang.String name,
Resource resource)
throws java.io.IOException
java.io.IOExceptionpublic ResourcePropertySource(Resource resource) throws java.io.IOException
description of the given resource.java.io.IOExceptionpublic ResourcePropertySource(java.lang.String name,
java.lang.String location,
java.lang.ClassLoader classLoader)
throws java.io.IOException
classpath:).java.io.IOExceptionpublic ResourcePropertySource(java.lang.String name,
java.lang.String location)
throws java.io.IOException
classpath:.java.io.IOExceptionpublic ResourcePropertySource(java.lang.String location,
java.lang.ClassLoader classLoader)
throws java.io.IOException
classpath:. The name of the PropertySource will be
generated based on the description of the
resource.java.io.IOExceptionpublic ResourcePropertySource(java.lang.String location)
throws java.io.IOException
description of the resource.java.io.IOException