public class SpringWebFluxLinkBuilder
extends org.thymeleaf.linkbuilder.StandardLinkBuilder
Spring WebFlux-based implementation of ILinkBuilder
.
This class will build link URLs using the Spring WebFlux API and adapting to the needs of this type of application.
This implementation will only return null at StandardLinkBuilder.buildLink(IExpressionContext, String, Map)
if the specified base argument is null.
Constructor and Description |
---|
SpringWebFluxLinkBuilder() |
Modifier and Type | Method and Description |
---|---|
protected String |
computeContextPath(org.thymeleaf.context.IExpressionContext context,
String base,
Map<String,Object> parameters)
Compute the context path to be applied to URLs that have been determined to be context-relative (and therefore
might need a context path to be inserted at their beginning).
|
protected String |
processLink(org.thymeleaf.context.IExpressionContext context,
String link)
Process an already-built URL just before returning it.
|
protected String computeContextPath(org.thymeleaf.context.IExpressionContext context, String base, Map<String,Object> parameters)
Compute the context path to be applied to URLs that have been determined to be context-relative (and therefore might need a context path to be inserted at their beginning).
This method will obtain the context path from ServerHttpRequest.getContextPath(), throwing an exception if context is not an instance of ISpringWebFluxContext given context-relative URLs are (by default) only allowed in Spring WebFlux contexts.
This method can be overridden by any subclasses that want to change this behaviour.
computeContextPath
in class org.thymeleaf.linkbuilder.StandardLinkBuilder
context
- the execution context.base
- the URL base specified.parameters
- the URL parameters specified.protected String processLink(org.thymeleaf.context.IExpressionContext context, String link)
Process an already-built URL just before returning it.
This method can be overridden by any subclasses that want to change this behaviour.
processLink
in class org.thymeleaf.linkbuilder.StandardLinkBuilder
context
- the execution context.link
- the already-built URL.Copyright © 2017 The THYMELEAF team. All rights reserved.