Skip to content

Commit 207b9a1

Browse files
committed
Improve the documentation and discoverability of CoWebFilter
Closes gh-31877
1 parent 05ebca8 commit 207b9a1

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

framework-docs/modules/ROOT/pages/languages/kotlin/coroutines.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Spring Framework provides support for Coroutines on the following scope:
1414
* Suspending function support in Spring MVC and WebFlux annotated `@Controller`
1515
* Extensions for WebFlux {spring-framework-api-kdoc}/spring-webflux/org.springframework.web.reactive.function.client/index.html[client] and {spring-framework-api-kdoc}/spring-webflux/org.springframework.web.reactive.function.server/index.html[server] functional API.
1616
* WebFlux.fn {spring-framework-api-kdoc}/spring-webflux/org.springframework.web.reactive.function.server/co-router.html[coRouter { }] DSL
17+
* WebFlux {spring-framework-api-kdoc}/spring-web/org.springframework.web.server/-co-web-filter/index.html[`CoWebFilter`]
1718
* Suspending function and `Flow` support in RSocket `@MessageMapping` annotated methods
1819
* Extensions for {spring-framework-api-kdoc}/spring-messaging/org.springframework.messaging.rsocket/index.html[`RSocketRequester`]
1920

spring-web/src/main/java/org/springframework/web/server/WebFilter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
* be used to implement cross-cutting, application-agnostic requirements such
2424
* as security, timeouts, and others.
2525
*
26+
* <p>Consider using {@code org.springframework.web.server.CoWebFilter} with
27+
* Kotlin Coroutines.
28+
*
2629
* @author Rossen Stoyanchev
2730
* @since 5.0
2831
*/

spring-web/src/main/kotlin/org/springframework/web/server/CoWebFilter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import kotlin.coroutines.CoroutineContext
2626

2727
/**
2828
* Kotlin-specific implementation of the [WebFilter] interface that allows for
29-
* using coroutines.
29+
* using coroutines, including [kotlin.coroutines.CoroutineContext] propagation.
3030
*
3131
* @author Arjen Poutsma
3232
* @author Sebastien Deleuze

0 commit comments

Comments
 (0)