Top Description Constructors Methods
org.springframework.web.context.support

public Class ServletContextPropertySource

extends EnumerablePropertySource<ServletContext>
Class Inheritance
Imports
jakarta.servlet.ServletContext, org.springframework.core.env.EnumerablePropertySource, .PropertySource, org.springframework.lang.Nullable, org.springframework.util.StringUtils

PropertySource that reads init parameters from a ServletContext object.
Author
Chris Beams
Since
3.1
See Also
ServletConfigPropertySource

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getProperty(String
the property to find
name
)

Implements abstract org.springframework.core.env.PropertySource.getProperty.

Return the value associated with the given name, or null if not found.

public String[]
getPropertyNames()

Implements abstract org.springframework.core.env.EnumerablePropertySource.getPropertyNames.

Return the names of all properties contained by the source object (never null).

Inherited from org.springframework.core.env.EnumerablePropertySource:
containsProperty

Constructor Detail

ServletContextPropertySourceback to summary
public ServletContextPropertySource(String name, ServletContext servletContext)

Method Detail

getPropertyback to summary
public String getProperty(String name)

Implements abstract org.springframework.core.env.PropertySource.getProperty.

Doc from org.springframework.core.env.PropertySource.getProperty.

Return the value associated with the given name, or null if not found.

Parameters
name:String

the property to find

Annotations
@Override
@Nullable
getPropertyNamesback to summary
public String[] getPropertyNames()

Implements abstract org.springframework.core.env.EnumerablePropertySource.getPropertyNames.

Doc from org.springframework.core.env.EnumerablePropertySource.getPropertyNames.

Return the names of all properties contained by the source object (never null).

Annotations
@Override