Commit 05c877d
committed
Only apply path to default PathPatternRequestMatcher.Builder
Prior to this commit, if the user defined a custom
PathPatternRequestMatcher.Builder, security auto-configuration would
still set its base path to matcher the dispatcher servlet path.
We need to give the user more control in this situation.
If the user has defined a custom builder bean it should have a name
other than pathPatternRequestMatcherBuilder. This different name is
required to prevent a clash with the @fallback bean that's defined
by Security's AuthorizationConfiguration. This commit changes the
bean post-processor so that it will only apply to a bean named
pathPatternRequestMatcherBuilder. By using a different name (which
is necessary unless overriding is enabled) to use can take complete
control of the path pattern request matcher builder.
See gh-454921 parent 5bafe70 commit 05c877d
File tree
2 files changed
+23
-1
lines changed- module/spring-boot-security/src
- main/java/org/springframework/boot/security/autoconfigure/servlet
- test/java/org/springframework/boot/security/autoconfigure/servlet
2 files changed
+23
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
219 | 240 | | |
220 | 241 | | |
221 | 242 | | |
| |||
0 commit comments