public static final class StaticResourceRequest.StaticResourceRequestMatcher extends ApplicationContextRequestMatcher<DispatcherServletPath>
Locations
.Modifier and Type | Method and Description |
---|---|
StaticResourceRequest.StaticResourceRequestMatcher |
excluding(Set<StaticResourceLocation> locations)
Return a new
StaticResourceRequest.StaticResourceRequestMatcher based on this one but
excluding the specified locations. |
StaticResourceRequest.StaticResourceRequestMatcher |
excluding(StaticResourceLocation first,
StaticResourceLocation... rest)
Return a new
StaticResourceRequest.StaticResourceRequestMatcher based on this one but
excluding the specified locations. |
protected boolean |
ignoreApplicationContext(org.springframework.web.context.WebApplicationContext applicationContext)
Returns if the
WebApplicationContext should be ignored and not used for
matching. |
protected void |
initialized(Supplier<DispatcherServletPath> dispatcherServletPath)
Method that can be implemented by subclasses that wish to initialize items the
first time that the matcher is called.
|
protected boolean |
matches(HttpServletRequest request,
Supplier<DispatcherServletPath> context)
Decides whether the rule implemented by the strategy matches the supplied request.
|
matches
public StaticResourceRequest.StaticResourceRequestMatcher excluding(StaticResourceLocation first, StaticResourceLocation... rest)
StaticResourceRequest.StaticResourceRequestMatcher
based on this one but
excluding the specified locations.first
- the first location to excluderest
- additional locations to excludeStaticResourceRequest.StaticResourceRequestMatcher
public StaticResourceRequest.StaticResourceRequestMatcher excluding(Set<StaticResourceLocation> locations)
StaticResourceRequest.StaticResourceRequestMatcher
based on this one but
excluding the specified locations.locations
- the locations to excludeStaticResourceRequest.StaticResourceRequestMatcher
protected void initialized(Supplier<DispatcherServletPath> dispatcherServletPath)
ApplicationContextRequestMatcher
ApplicationContextRequestMatcher.ignoreApplicationContext(WebApplicationContext)
returns
false
. Note that the supplied context will be based on the
first request sent to the matcher.initialized
in class ApplicationContextRequestMatcher<DispatcherServletPath>
dispatcherServletPath
- a supplier for the initialized context (may throw an exception)ApplicationContextRequestMatcher.ignoreApplicationContext(WebApplicationContext)
protected boolean ignoreApplicationContext(org.springframework.web.context.WebApplicationContext applicationContext)
ApplicationContextRequestMatcher
WebApplicationContext
should be ignored and not used for
matching. If this method returns true
then the context will not be used and
the matches
method will return false
.ignoreApplicationContext
in class ApplicationContextRequestMatcher<DispatcherServletPath>
applicationContext
- the candidate web application contextprotected boolean matches(HttpServletRequest request, Supplier<DispatcherServletPath> context)
ApplicationContextRequestMatcher
matches
in class ApplicationContextRequestMatcher<DispatcherServletPath>
request
- the source requestcontext
- a supplier for the initialized context (may throw an exception)Copyright © 2019 Pivotal Software, Inc.. All rights reserved.