Add method level guard for servlet filter and Its test code#282
Merged
sczyh30 merged 4 commits intoalibaba:masterfrom Dec 9, 2018
Merged
Add method level guard for servlet filter and Its test code#282sczyh30 merged 4 commits intoalibaba:masterfrom
sczyh30 merged 4 commits intoalibaba:masterfrom
Conversation
In addition, I submit test code for the method scenario
Codecov Report
@@ Coverage Diff @@
## master #282 +/- ##
===========================================
+ Coverage 46.27% 46.37% +0.1%
- Complexity 927 929 +2
===========================================
Files 181 181
Lines 5746 5753 +7
Branches 830 832 +2
===========================================
+ Hits 2659 2668 +9
+ Misses 2751 2741 -10
- Partials 336 344 +8
Continue to review full report at Codecov.
|
sczyh30
reviewed
Dec 7, 2018
...entinel-web-servlet/src/main/java/com/alibaba/csp/sentinel/adapter/servlet/CommonFilter.java
Outdated
Show resolved
Hide resolved
Member
|
Thanks for contributing! |
Arlmls
pushed a commit
to Arlmls/Sentinel
that referenced
this pull request
Jan 8, 2019
…lter (alibaba#282) - Add HTTP method level support for servlet filter with a init parameter `HTTP_METHOD_SPECIFY` as the switch. This is useful for REST APIs. - Add test cases and fix test bug by reset the cluster node in ClusterBuilderSlot
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it
This PR makes Sentinel Servlet Filter support Http method level flow control if necessary
Does this pull request fix one issue?
Fixes #247
Describe how you did it
The implementation steps are as follows:
Describe how to verify it
This PR include the test code to verify it. The test code is in the package "com.alibaba.csp.sentinel.adapter.servletmethod"
Special notes for reviews