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 Details

    • WebAppConfigSource

      public WebAppConfigSource(String filename)
      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

      public WebAppConfigSource(List<String> sourceStrings)
      Parameters:
      sourceStrings - List of paths to files in a web application
  • Method Details

    • setServletContext

      public void setServletContext(jakarta.servlet.ServletContext servletContext)
      Specified by:
      setServletContext in interface org.springframework.web.context.ServletContextAware
      See Also:
      • ServletContextAware.setServletContext(jakarta.servlet.ServletContext)
    • getInputStream

      public InputStream getInputStream(String sourceString)
      Specified by:
      getInputStream in class org.springframework.extensions.config.source.BaseConfigSource
      See Also:
      • BaseConfigSource.getInputStream(java.lang.String)