This commit polishes the proposed test for the WebFlux Cloud Foundry
endpoint. To protect against future regressions, it also adds tests
for the general purpose links endpoints (WebFlux, Web MVC, and
Jersey) and for the Web MVC Cloud Foundry endpoint.
See gh-50008
CloudFoundryLinksHandler passes request.getURI().toString() directly
to EndpointLinksResolver.resolveLinks(), which includes the query
string. This causes generated link hrefs to contain the query
(for example, "/cfApplication?x=1/info"). The standard WebFlux and
Cloud Foundry servlet siblings already strip the query before
resolving links.
Use UriComponentsBuilder.replaceQuery(null) to match the pattern used
by WebFluxEndpointHandlerMapping and add a regression test for a
query-string request.
Signed-off-by: Lee JiWon <dlwldnjs1009@gmail.com>
See gh-50008
We need to ensure that MockMvcAutoConfiguration has defined its
DispatcherServletPath bean before the condition that checks for it in
ServletWebSecurityAutoConfiguration is evaluated.
Ideally, ServletWebSecurityAutoConfiguration in spring-boot-security
would not know about test-specific code but there's no easy way to
establish the required ordering without this link. One alternative
option is an auto-configuration class in spring-boot-security-test
that's purely for ordering purposes. This was rejected as it would
introduce new public API (as we enforce that all auto-configurations
are public).
Fixes gh-49854
This commit stops including the MongoDB starter in the Data MongDB
reactive starter as the former has already an opinion on the MongoDB
driver to use.
This makes sure the reactive starter no longer brings the synchronous
MongoDB driver.
Closes gh-49945
In Spring Boot 3.x, Jackson2ObjectMapperBuilder disabled
FAIL_ON_UNKNOWN_PROPERTIES. This commit aligns the behavior of
use-jackson2-defaults with this.
This commit also ensures that DEFAULT_VIEW_INCLUSION is disabled. It
was enabled by default in Jackson 2 and then disabled by
Jackson2ObjectMapperBuilder. At the time of writing, Jackson 3's
configureForJackson2() method does not enable DEFAULT_VIEW_INCLUSION.
Should that ever be corrected/changed in Jackson 3, this additional
change in this commit ensures that the Boot will continue to have the
desired default.
Fixes gh-49951