-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Andy Wilkinson opened SPR-15933 and commented
When RouterFunctionMapping logs a message about a composed router function, the message conveys nothing other than something was mapped. This severely limits the messages usefulness.
With a function with a single mapping:
@Bean
public RouterFunction<ServerResponse> foo() {
return route(GET("/foo"), (request) -> ServerResponse.ok().build());
}The log message describes the predicates and the target of the mapping:
2017-09-07 12:12:49.758 INFO 46234 --- [ main] o.s.w.r.f.s.s.RouterFunctionMapping : Mapped (GET && /foo) -> com.example.demo.Gh9979Application$$Lambda$159/1751403001@7fc6de5b
By contrast, with a composed router function:
@Bean
public RouterFunction<ServerResponse> barAndBaz() {
return route(GET("/bar"), this::emptyOk).and(route(GET("baz"), this::emptyOk));
}The log message doesn't describe any of the predicates or the targets of the mappings:
2017-09-07 12:12:49.758 INFO 46234 --- [ main] o.s.w.r.f.s.s.RouterFunctionMapping : Mapped org.springframework.web.reactive.function.server.RouterFunction$$Lambda$163/632475595@fb9c7aa
Would it be possible to capture the information about each individual function that's part of the composed function so that the log message can convey some information about all of the mappings that are involved?
Affects: 5.0 RC3
Issue Links:
- Get a description of all registered routes in a RouterFunction [SPR-15711] #20268 Get a description of all registered routes in a RouterFunction ("depends on")
- Provide an API for introspection of a dispatcher handler's handler mappings [SPR-15935] #20489 Provide an API for introspection of a dispatcher handler's handler mappings
- Get a description of all registered routes in a RouterFunction [SPR-15711] #20268 Get a description of all registered routes in a RouterFunction
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement