PathMatchingResourcePatternResolver,
able to find matching resources below the web application root directory
via ServletContext#getResourcePaths. Falls back to the superclass'
file system checking for other resources.
| Modifier and Type | Field and Description |
|---|---|
| private static final Log |
| Access | Constructor and Description |
|---|---|
| public | ServletContextResourcePatternResolver(ServletContext
the ServletContext to load resources with servletContext)Create a new ServletContextResourcePatternResolver. |
| public | ServletContextResourcePatternResolver(ResourceLoader
the ResourceLoader to load root directories and
actual resources with resourceLoader)Create a new ServletContextResourcePatternResolver. |
| Modifier and Type | Method and Description |
|---|---|
| protected Set | doFindPathMatchingFileResources(Resource
the root directory as a Resource rootDirResource, String the sub pattern to match (below the root directory) subPattern)
Overridden version which checks for ServletContextResource
and uses ServletContext.getResourcePaths to find
matching resources below the web application root directory.
|
| private void | doRetrieveMatchingJarEntries(String
the path to the jar file jarFilePath, String the pattern for jar entries to match entryPattern, Set<Resource> the Set of matching Resources to add to result)Extract entries from the given jar by pattern. |
| protected void | doRetrieveMatchingServletContextResources(ServletContext
the ServletContext to work on servletContext, String the pattern to match against,
with prepended root directory path fullPattern, String the current directory dir, Set<Resource> the Set of matching Resources to add to result)Recursively retrieve ServletContextResources that match the given pattern, adding them to the given result set. |
| logger | back to summary |
|---|---|
| private static final Log logger Hides org. | |
| ServletContextResourcePatternResolver | back to summary |
|---|---|
| public ServletContextResourcePatternResolver(ServletContext servletContext) Create a new ServletContextResourcePatternResolver.
| |
| ServletContextResourcePatternResolver | back to summary |
|---|---|
| public ServletContextResourcePatternResolver(ResourceLoader resourceLoader) Create a new ServletContextResourcePatternResolver.
| |
| doFindPathMatchingFileResources | back to summary |
|---|---|
| protected Set Overridden version which checks for ServletContextResource
and uses
| |
| doRetrieveMatchingJarEntries | back to summary |
|---|---|
| private void doRetrieveMatchingJarEntries(String jarFilePath, String entryPattern, Set<Resource> result) Extract entries from the given jar by pattern. | |
| doRetrieveMatchingServletContextResources | back to summary |
|---|---|
| protected void doRetrieveMatchingServletContextResources(ServletContext servletContext, String fullPattern, String dir, Set<Resource> result) throws IOException Recursively retrieve ServletContextResources that match the given pattern, adding them to the given result set.
| |