-
Notifications
You must be signed in to change notification settings - Fork 935
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for HTTP GET map parameters (#6072)
## Motivation: This pull request addresses #6058 Currently, `@Param` cannot be mapped to a Map, but this change enables that functionality, allowing query parameters to be handled as a Map. ## Modifications: - Introduced logic in `AnnotatedValueResolver` to detect when a parameter is of type Map and the `@Param` annotation has an unspecified value. - Future enhancements may include supporting the mapping of specific values to a Map when the `@Param` value is explicitly specified. - Added a new method `ofQueryParamMap` to handle the creation of an AnnotatedValueResolver for mapping all query parameters into a Map. - Query parameters are collected into a Map using the stream-based collector. - Updated the existing logic to ensure this behavior only applies when the `@Param` value is unspecified and the parameter type is Map. ## Result: - Closes #6058 - Users can now define a method parameter annotated with `@Param` as `Map<String, Object>` to handle all query parameters.
- Loading branch information
1 parent
242d029
commit b1a09d4
Showing
3 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters