Skip to content

Commit 9b85c5b

Browse files
committed
Rename RouterDsl to RouterFunctionDsl
1 parent 18d8876 commit 9b85c5b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionExtensions.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ import reactor.core.publisher.Mono
5050
* @see <a href="https://youtrack.jetbrains.com/issue/KT-15667">Kotlin issue about supporting ::foo for member functions</a>
5151
*/
5252

53-
typealias Routes = RouterDsl.() -> Unit
53+
typealias Routes = RouterFunctionDsl.() -> Unit
5454

5555
/**
5656
* Allow to create easily a [RouterFunction] from [Routes]
5757
*/
58-
fun router(routes: Routes) = RouterDsl().apply(routes).router()
58+
fun router(routes: Routes) = RouterFunctionDsl().apply(routes).router()
5959

60-
class RouterDsl {
60+
class RouterFunctionDsl {
6161

6262
val routes = mutableListOf<RouterFunction<ServerResponse>>()
6363

@@ -76,11 +76,11 @@ class RouterDsl {
7676
operator fun RequestPredicate.not(): RequestPredicate = this.negate()
7777

7878
fun RequestPredicate.nest(r: Routes) {
79-
routes += RouterFunctions.nest(this, RouterDsl().apply(r).router())
79+
routes += RouterFunctions.nest(this, RouterFunctionDsl().apply(r).router())
8080
}
8181

8282
fun String.nest(r: Routes) {
83-
routes += RouterFunctions.nest(path(this), RouterDsl().apply(r).router())
83+
routes += RouterFunctions.nest(path(this), RouterFunctionDsl().apply(r).router())
8484
}
8585

8686
operator fun RequestPredicate.invoke(f: (ServerRequest) -> Mono<ServerResponse>) {

0 commit comments

Comments
 (0)