Class ServletContextPropertySource
- java.lang.Object
- org.springframework.core.env.PropertySource<T>
- org.springframework.core.env.EnumerablePropertySource<ServletContext>
- org.springframework.web.context.support.ServletContextPropertySource
public class ServletContextPropertySource extends EnumerablePropertySource<ServletContext>
PropertySourcethat reads init parameters from aServletContextobject.- Since:
- 3.1
- Author:
- Chris Beams
- See Also:
ServletConfigPropertySource
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.env.PropertySource
PropertySource.StubPropertySource
Field Summary
Fields inherited from class org.springframework.core.env.PropertySource
logger, name, source
Constructor Summary
Constructors Constructor Description ServletContextPropertySource(String name, ServletContext servletContext)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetProperty(String name)Return the value associated with the given name, ornullif not found.String[]getPropertyNames()Return the names of all properties contained by the source object (nevernull).Methods inherited from class org.springframework.core.env.EnumerablePropertySource
containsProperty
Constructor Detail
ServletContextPropertySource
public ServletContextPropertySource(String name, ServletContext servletContext)
Method Detail
getPropertyNames
public String[] getPropertyNames()
Description copied from class:EnumerablePropertySourceReturn the names of all properties contained by the source object (nevernull).- Specified by:
getPropertyNamesin classEnumerablePropertySource<ServletContext>
getProperty
public String getProperty(String name)
Description copied from class:PropertySourceReturn the value associated with the given name, ornullif not found.- Specified by:
getPropertyin classPropertySource<ServletContext>- Parameters:
name- the property to find- See Also:
PropertyResolver.getRequiredProperty(String)