This class is aware of Spring WebFlux 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 final Map | |
| private static final Log |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public final Mono | Returns: the resolved public resource URL path, or empty if unresolvedthe URI string to transform uriString, ServerWebExchange the current exchange exchange)Get the public resource URL for the given URI string. |
| public Map | getHandlerMap()
Return a read-only view of the resource handler mappings either manually configured or auto-detected from Spring configuration. |
| private int | |
| public void | onApplicationEvent(ContextRefreshedEvent
the event to respond to event)Implements org. Handle an application event. |
| public void | registerHandlers(Map<String, ResourceWebHandler> handlerMap)
Manually configure resource handler mappings. |
| private Mono | |
| 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. |
| applicationContext | back to summary |
|---|---|
| private ApplicationContext applicationContext
| |
| handlerMap | back to summary |
|---|---|
| private final Map<PathPattern, ResourceWebHandler> handlerMap | |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| ResourceUrlProvider | back to summary |
|---|---|
| public ResourceUrlProvider() | |
| detectResourceHandlers | back to summary |
|---|---|
| private void detectResourceHandlers(ApplicationContext context) | |
| getForUriString | back to summary |
|---|---|
| public final Mono Get the public resource URL for the given URI string. The URI string is expected to be a path and if it contains a query or fragment those will be preserved in the resulting public resource URL.
| |
| getHandlerMap | back to summary |
|---|---|
| public Map Return a read-only view of the resource handler mappings either manually configured or auto-detected from Spring configuration. | |
| getQueryIndex | back to summary |
|---|---|
| private int getQueryIndex(String path) | |
| onApplicationEvent | back to summary |
|---|---|
| public void onApplicationEvent(ContextRefreshedEvent event) Implements org. Doc from org. Handle an application event.
| |
| registerHandlers | back to summary |
|---|---|
| public void registerHandlers(Map<String, ResourceWebHandler> handlerMap) Manually configure resource handler mappings. Note by default resource mappings are auto-detected
from the Spring | |
| resolveResourceUrl | back to summary |
|---|---|
| private Mono | |
| 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
| |