From 9b85c5b6361a1a0997733326992dbb9005b16c9f Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Mon, 10 Apr 2017 10:25:58 +0200 Subject: [PATCH] Rename RouterDsl to RouterFunctionDsl --- .../function/server/RouterFunctionExtensions.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionExtensions.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionExtensions.kt index 2f11648ad6..6435047f8c 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionExtensions.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionExtensions.kt @@ -50,14 +50,14 @@ import reactor.core.publisher.Mono * @see Kotlin issue about supporting ::foo for member functions */ -typealias Routes = RouterDsl.() -> Unit +typealias Routes = RouterFunctionDsl.() -> Unit /** * Allow to create easily a [RouterFunction] from [Routes] */ -fun router(routes: Routes) = RouterDsl().apply(routes).router() +fun router(routes: Routes) = RouterFunctionDsl().apply(routes).router() -class RouterDsl { +class RouterFunctionDsl { val routes = mutableListOf>() @@ -76,11 +76,11 @@ class RouterDsl { operator fun RequestPredicate.not(): RequestPredicate = this.negate() fun RequestPredicate.nest(r: Routes) { - routes += RouterFunctions.nest(this, RouterDsl().apply(r).router()) + routes += RouterFunctions.nest(this, RouterFunctionDsl().apply(r).router()) } fun String.nest(r: Routes) { - routes += RouterFunctions.nest(path(this), RouterDsl().apply(r).router()) + routes += RouterFunctions.nest(path(this), RouterFunctionDsl().apply(r).router()) } operator fun RequestPredicate.invoke(f: (ServerRequest) -> Mono) {