-
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
Arjen Poutsma opened SPR-16953 and commented
We should add a (Java) DSL to org.springframework.web.servlet.function that makes it easier to discover the routing possibilities that all the request predicates offer.
So, instead of writing
RouterFunction routerFunction = route(GET("/pets/{id}", request -> ServerResponse.ok.build())
where both route
and GET
are statically imported, it should be more discoverable.
For instance, by introducing a builder with methods that directly express common request predicates, eg. routeGET(String, HandlerFunction)
instead of route(RequestPredicate, HandlerFunction
.
Issue Links:
- Introduce Servlet version HandlerFunction and RouterFunction [SPR-16952] #21490 Introduce Servlet version HandlerFunction and RouterFunction
- Improve RouterFunctions reference documentation [SPR-17016] #21554 Improve RouterFunctions reference documentation
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