forked from line/armeria
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance annotated service path mapping: HTTP method and media type ba…
…sed mapping (line#696) Motivation: Currently we cannot bind two or more service methods with the same path even if they have different HTTP methods. Also, we need to bind them depending on 'content-type' or 'accept' header of the request for some cases. These modifications will affect only to annotated service for now, and then apply this feature to the other services later. Modifications: - Fix a bug that might get a wrong service instance from the cache when finding a service. - Add `PathMappingContext` and use it as a `PathMapping`'s argument instead of '(path, query)'. - Introduce a simple content negotiation mechanism to find a service method by 'content-type' or 'accept' header. - Add 'score' to `PathMappingResult` to find the best suitable service method. - Add 'Router' and 'RoutingTrie' in order to find a service in an efficient way. - Remove 'PathMappings' and use 'Router' instead. - Apply caffeine cache to improve the efficiency of the service cache. Result: - Fixes line#579
- Loading branch information
Showing
62 changed files
with
3,787 additions
and
721 deletions.
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
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
Oops, something went wrong.