This class is aware of Spring MVC handler mappings used to serve static
resources and uses the ResourceResolver chains of the configured
ResourceHttpRequestHandlers to make its decisions.
| Modifier and Type | Field and Description |
|---|---|
| private ApplicationContext | |
| private boolean | |
| private final Map | |
| protected final Log | |
| private PathMatcher | |
| private UrlPathHelper |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| private int | |
| public final String | Returns: the resolved public URL path, ornull if unresolvedthe lookup path to check lookupPath)Compare the given path against configured resource handler mappings and
if a match is found use the |
| public final String | Returns: the resolved public URL path, ornull if unresolvedthe current request request, String the request URL path to resolve requestUrl)A variation on |
| public Map | getHandlerMap()
Return the resource mappings, either manually configured or auto-detected
when the Spring |
| private int | |
| public PathMatcher | |
| public UrlPathHelper | |
| public boolean | |
| public void | onApplicationEvent(ContextRefreshedEvent
the event to respond to event)Implements org. Handle an application event. |
| public void | setApplicationContext(ApplicationContext
the ApplicationContext object to be used by this object applicationContext)Implements org. Set the ApplicationContext that this object runs in. Normally this call will be used to initialize the object. |
| public void | setHandlerMap(Map<String, ResourceHttpRequestHandler> handlerMap)
Manually configure the resource mappings. |
| public void | setPathMatcher(PathMatcher pathMatcher)
Configure a |
| public void | setUrlPathHelper(UrlPathHelper urlPathHelper)
Configure a |
| applicationContext | back to summary |
|---|---|
| private ApplicationContext applicationContext
| |
| autodetect | back to summary |
|---|---|
| private boolean autodetect | |
| handlerMap | back to summary |
|---|---|
| private final Map<String, ResourceHttpRequestHandler> handlerMap | |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| pathMatcher | back to summary |
|---|---|
| private PathMatcher pathMatcher | |
| urlPathHelper | back to summary |
|---|---|
| private UrlPathHelper urlPathHelper | |
| ResourceUrlProvider | back to summary |
|---|---|
| public ResourceUrlProvider() | |
| detectResourceHandlers | back to summary |
|---|---|
| protected void detectResourceHandlers(ApplicationContext appContext) | |
| getEndPathIndex | back to summary |
|---|---|
| private int getEndPathIndex(String lookupPath) | |
| getForLookupPath | back to summary |
|---|---|
| public final String getForLookupPath(String lookupPath) Compare the given path against configured resource handler mappings and
if a match is found use the It is expected that the given path is what Spring MVC would use for request mapping purposes, i.e. excluding context and servlet path portions. If several handler mappings match, the handler used will be the one configured with the most specific pattern. | |
| getForRequestUrl | back to summary |
|---|---|
| public final String getForRequestUrl(HttpServletRequest request, String requestUrl) A variation on
| |
| getHandlerMap | back to summary |
|---|---|
| public Map Return the resource mappings, either manually configured or auto-detected
when the Spring | |
| getLookupPathIndex | back to summary |
|---|---|
| private int getLookupPathIndex(HttpServletRequest request) | |
| getPathMatcher | back to summary |
|---|---|
| public PathMatcher getPathMatcher() Return the configured | |
| getUrlPathHelper | back to summary |
|---|---|
| public UrlPathHelper getUrlPathHelper() Return the configured
| |
| isAutodetect | back to summary |
|---|---|
| public boolean isAutodetect() Return | |
| onApplicationEvent | back to summary |
|---|---|
| public void onApplicationEvent(ContextRefreshedEvent event) Implements org. Doc from org. Handle an application event.
| |
| setApplicationContext | back to summary |
|---|---|
| public void setApplicationContext(ApplicationContext applicationContext) throws BeansException Implements org. Doc from org. Set the ApplicationContext that this object runs in. Normally this call will be used to initialize the object. Invoked after population of normal bean properties but before an init callback such
as
| |
| setHandlerMap | back to summary |
|---|---|
| public void setHandlerMap(Map<String, ResourceHttpRequestHandler> handlerMap) Manually configure the resource mappings. Note by default resource mappings are auto-detected
from the Spring | |
| setPathMatcher | back to summary |
|---|---|
| public void setPathMatcher(PathMatcher pathMatcher) Configure a | |
| setUrlPathHelper | back to summary |
|---|---|
| public void setUrlPathHelper(UrlPathHelper urlPathHelper) Configure a | |