Class WebAppConfigSource
java.lang.Object
org.springframework.extensions.config.source.BaseConfigSource
org.springframework.extensions.config.source.WebAppConfigSource
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.extensions.config.ConfigSource,org.springframework.web.context.ServletContextAware
public class WebAppConfigSource
extends org.springframework.extensions.config.source.BaseConfigSource
implements org.springframework.web.context.ServletContextAware
ConfigSource implementation that gets its data via files in a web
application.
TODO: Also deal with the source being specified as an init param i.e.
param:config.files
- Author:
- gavinc
-
Constructor Summary
ConstructorsConstructorDescriptionWebAppConfigSource(String filename) Constructs a webapp configuration source that uses a single fileWebAppConfigSource(List<String> sourceStrings) -
Method Summary
Modifier and TypeMethodDescriptiongetInputStream(String sourceString) voidsetServletContext(jakarta.servlet.ServletContext servletContext) Methods inherited from class org.springframework.extensions.config.source.BaseConfigSource
addSourceString, getConfigDeployments
-
Constructor Details
-
WebAppConfigSource
Constructs a webapp configuration source that uses a single file- Parameters:
filename- the name of the file from which to get config- See Also:
-
WebAppConfigSource
- Parameters:
sourceStrings- List of paths to files in a web application
-
-
Method Details
-
setServletContext
public void setServletContext(jakarta.servlet.ServletContext servletContext) - Specified by:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware- See Also:
-
ServletContextAware.setServletContext(jakarta.servlet.ServletContext)
-
getInputStream
- Specified by:
getInputStreamin classorg.springframework.extensions.config.source.BaseConfigSource- See Also:
-
BaseConfigSource.getInputStream(java.lang.String)
-