what happens when you DUPLICATE shiro filters with the same exact pattern? I know the "first match wins" policy applies to two similar patterns,
addFilterChain("/secure/**", ROLE_1); // this one is used
addFilterChain("/secure/foo", ROLE_2);
but what if the patterns are ACTUALLY identical? which one will be used here, #1 or #2?
addFilterChain("/secure/bar", ROLE_1);
addFilterChain("/secure/bar", ROLE_2);
i expect the "first match wins" policy will still apply but i wanted to make sure.
#2
The addFilterChain
method adds a value to a Map, the second entry will overwrite the first
This is different from the first example where you have different patterns, and the first pattern to match the request will be used.