#1152 - Allow adding path segments to links created via WebFluxLinkBuilder.
WebFluxLinkBuilder now allows to call ….slash(…) in symmetry to other LinkBuilder implementations.
This commit is contained in:
@@ -116,6 +116,20 @@ public class WebFluxLinkBuilder extends TemplateVariableAwareLinkBuilderSupport<
|
||||
|
||||
private final Mono<WebFluxLinkBuilder> builder;
|
||||
|
||||
/**
|
||||
* Creates a new {@link WebFluxBuilder} appending the given path to the currently to be built link.
|
||||
*
|
||||
* @param path must not be {@literal null}.
|
||||
* @return
|
||||
* @since 1.1
|
||||
*/
|
||||
public WebFluxBuilder slash(String path) {
|
||||
|
||||
Assert.notNull(path, "Path must not be null!");
|
||||
|
||||
return new WebFluxBuilder(builder.map(it -> it.slash(path)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link WebFluxLink} for the {@link Link} with the given {@link LinkRelation}
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user