diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt index b9108ab3de..db009813a5 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt @@ -395,6 +395,9 @@ open class CoRouterFunctionDsl(private val init: (CoRouterFunctionDsl.() -> Unit } } + /** + * Return a composed routing function created from all the registered routes. + */ override fun invoke(): RouterFunction { init() return builder.build() @@ -475,6 +478,9 @@ open class CoRouterFunctionDsl(private val init: (CoRouterFunctionDsl.() -> Unit } +/** + * Equivalent to [RouterFunction.and]. + */ operator fun RouterFunction.plus(other: RouterFunction) = this.and(other)