-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Description
Hello!
Currently, I'm migrating over the non-reactive RouterFunctions with Spring Boot 4.0.3 using this code:
@Bean
public RouterFunction<ServerResponse> testEndpoints() {
return RouterFunctions.route()
.path("/rootPath", customizer -> customizer
.GET("/subPathOne", request -> ServerResponse.ok().build())
.GET("/subPathTwo", request -> ServerResponse.ok().build()))
.build();
}While the RouterFunctions are built properly (or at least the structure looks good), the generated EndPoints are missing the actual structure, and in case of the sample above only the /subPathOne and /subPathTwo endpoints are registered:

Spring-Boot version: 4.0.3 (but tested with 4.1.0.M2 with the same result)
Java version: Temurin JDK 25
Sample application: https://github.com/zolkiss/spring-routing-sample
So far what I found is that the RouterFunctionMappingDescriptionProvider#describe Method does not generating correctly. While the mappings are looking OK, the visitor's description does not:

Tried a different syntax, the result is the same
@Bean
public RouterFunction<ServerResponse> testAlternative() {
return RouterFunctions.route()
.nest(path("/altPath"), customizer -> customizer
.GET("/subPathOne", request -> ServerResponse.ok().build())
.GET("/subPathTwo", request -> ServerResponse.ok().build()))
.build();
}