Skip to content

Commit cd27fbe

Browse files
committed
Add callouts to Kotlin examples for parity
1 parent bbfc39e commit cd27fbe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

framework-docs/src/docs/asciidoc/web/webflux-functional.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,14 +640,15 @@ RouterFunction<ServerResponse> route = route()
640640
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
641641
.Kotlin
642642
----
643-
val route = coRouter {
643+
val route = coRouter { // <1>
644644
"/person".nest {
645645
GET("/{id}", accept(APPLICATION_JSON), handler::getPerson)
646646
GET(accept(APPLICATION_JSON), handler::listPeople)
647647
POST(handler::createPerson)
648648
}
649649
}
650650
----
651+
<1> Create router using Coroutines router DSL; a Reactive alternative is also available via `router { }`.
651652

652653
Though path-based nesting is the most common, you can nest on any kind of predicate by using
653654
the `nest` method on the builder.

framework-docs/src/docs/asciidoc/web/webmvc-functional.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,13 +623,14 @@ RouterFunction<ServerResponse> route = route()
623623
import org.springframework.web.servlet.function.router
624624
625625
val route = router {
626-
"/person".nest {
626+
"/person".nest { // <1>
627627
GET("/{id}", accept(APPLICATION_JSON), handler::getPerson)
628628
GET(accept(APPLICATION_JSON), handler::listPeople)
629629
POST(handler::createPerson)
630630
}
631631
}
632632
----
633+
<1> Using `nest` DSL.
633634

634635
Though path-based nesting is the most common, you can nest on any kind of predicate by using
635636
the `nest` method on the builder.

0 commit comments

Comments
 (0)