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-45492
This commit harmonizes the check for the presence of an Encoding bean.
Also, as this bean may be provided by another auto-configuration, this
commit orders them explicitly.
This means the dependency to spring-boot-zipkin has to elevate from a
test-only dependency to (at least) an optional dependency to validate
the links between the two auto-configurations.
Closes gh-46295
The enum itself is not specifically tied to auto-configuration so
spring-boot is a better place for it. The related condition,
`@ConditionalOnThreading`, remains in spring-boot-autoconfigure. This
aligns things with the similar `CloudPlatform` and
`@ConditionalOnCloudPlatform`.
Closes gh-46406