ResourceTransformer with an optional helper method
for resolving public links within a transformed resource.
| Modifier and Type | Field and Description |
|---|---|
| private ResourceUrlProvider |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ResourceUrlProvider | |
| protected Mono | Returns: the resolved URL or an emptyMonothe path to a resource that needs to be re-written resourcePath, ServerWebExchange the current exchange exchange, Resource the resource being transformed resource, ResourceTransformerChain the transformer chain transformerChain)A transformer can use this method when a resource being transformed contains links to other resources. |
| public void | setResourceUrlProvider(ResourceUrlProvider
the URL provider to use resourceUrlProvider)Configure a |
| protected String | Returns: the absolute request path for the given resource paththe relative path to transform path, ServerWebExchange the current exchange exchange)Transform the given relative request path to an absolute path, taking the path of the given request as a point of reference. |
| resourceUrlProvider | back to summary |
|---|---|
| private ResourceUrlProvider resourceUrlProvider
| |
| ResourceTransformerSupport | back to summary |
|---|---|
| public ResourceTransformerSupport() | |
| getResourceUrlProvider | back to summary |
|---|---|
| public ResourceUrlProvider getResourceUrlProvider() Return the configured
| |
| resolveUrlPath | back to summary |
|---|---|
| protected Mono A transformer can use this method when a resource being transformed contains links to other resources. Such links need to be replaced with the public facing link as determined by the resource resolver chain (e.g. the public URL may have a version inserted).
| |
| setResourceUrlProvider | back to summary |
|---|---|
| public void setResourceUrlProvider(ResourceUrlProvider resourceUrlProvider) Configure a
| |
| toAbsolutePath | back to summary |
|---|---|
| protected String toAbsolutePath(String path, ServerWebExchange exchange) Transform the given relative request path to an absolute path, taking the path of the given request as a point of reference. The resulting path is also cleaned from sequences like "path/..".
| |