Class FilesystemGenericWebApplicationContext

All Implemented Interfaces:
Closeable, AutoCloseable, BeanFactory, HierarchicalBeanFactory, ListableBeanFactory, BeanDefinitionRegistry, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, AliasRegistry, EnvironmentCapable, ResourceLoader, ResourcePatternResolver, ThemeSource, ConfigurableWebApplicationContext, WebApplicationContext

public class FilesystemGenericWebApplicationContext extends GenericWebApplicationContext
An extension of GenericWebApplicationContext that is biased in favor of the filesystem such that bare resource paths are assumed to be files rather than classpath resources, and supports conditional resources.
Since:
6.1.0
  • Constructor Details

    • FilesystemGenericWebApplicationContext

      public FilesystemGenericWebApplicationContext()
      Constructor.
    • FilesystemGenericWebApplicationContext

      public FilesystemGenericWebApplicationContext(@Nonnull DefaultListableBeanFactory beanFactory)
      Constructor.
      Parameters:
      beanFactory - bean factory
    • FilesystemGenericWebApplicationContext

      public FilesystemGenericWebApplicationContext(@Nonnull ServletContext context)
      Constructor.
      Parameters:
      context - servlet context
    • FilesystemGenericWebApplicationContext

      public FilesystemGenericWebApplicationContext(@Nonnull DefaultListableBeanFactory beanFactory, ServletContext context)
      Constructor.
      Parameters:
      beanFactory - bean factory
      context - servlet context
  • Method Details

    • getResourceByPath

      @Nonnull protected Resource getResourceByPath(@Nonnull String path)

      Overrides the standard behavior of path-only resources and treats them as file paths if the path exists. Note that this differs from the ordinary Spring contexts that default to file paths because paths are treated as absolute if they are in fact absolute.

      Overrides:
      getResourceByPath in class GenericWebApplicationContext