public class ServletContextPropertySource extends EnumerablePropertySource<ServletContext>
PropertySource that reads init parameters from a ServletContext object.ServletConfigPropertySourcePropertySource.StubPropertySourcelogger, name, source| Constructor and Description |
|---|
ServletContextPropertySource(java.lang.String name,
ServletContext servletContext) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getProperty(java.lang.String name)
Return the value associated with the given name,
or
null if not found. |
java.lang.String[] |
getPropertyNames()
Return the names of all properties contained by the
source object (never
null). |
containsPropertypublic ServletContextPropertySource(java.lang.String name,
ServletContext servletContext)
public java.lang.String[] getPropertyNames()
EnumerablePropertySourcenull).getPropertyNames in class EnumerablePropertySource<ServletContext>@Nullable public java.lang.String getProperty(java.lang.String name)
PropertySourcenull if not found.getProperty in class PropertySource<ServletContext>name - the property to findPropertyResolver.getRequiredProperty(String)