Previously, the auto-configured JsonMapper would back off when any
type of ObjectMapper was defined. Updating this was missed as part
of the move to Jackson 3 where both Boot and Framework now intend to
use the more specific JsonMapper type.
This commit updates the condition such that a JsonMapper will still
be auto-configured when any other type of ObjectMapper is definied.
It will now only back off when a JsonMapper bean is defined.
Closes gh-47379
Remove the `spring-boot-web-server-test` module, adding
`SpringBootTestRandomPortContextCustomizerFactory` to
`spring-boot-web-server` as a replacement for
`SpringBootTestRandomPortApplicationListener`.
See gh-46356
See gh-47322
Move `@LocalServerPort` and `@LocalManagementServerPort` back to
`spring-boot-test`. The should help reduce upgrade pain since these
annotations are fairly commonly used. It also removes the need for
depending on `spring-boot-webserver-test`.
This is slight compromise with the module structure, since the
web-server module usually contributes the properties referenced
by the annotations.
See gh-46356
See gh-47322
Move `DisableReactorResourceFactoryGlobalResources...` support from
`spring-boot-web-server-test` back to `spring-boot-test` since it's
useful if Reactor Netty is being used directly and removes the need
for the `spring-boot-web-server-test` dependency.
See gh-46356
See gh-47322
Relocate `RestTestClientBuilderCustomizer` to `spring-boot-test`
and break the direct link to web-server by making use of
`spring.factories` and the new `BaseUrlProviders` class.
See gh-46356
Relocate `WebTestClientBuilderCustomizer` to `spring-boot-test`
and break the direct link to web-server and http-codec by making
use of `spring.factories` and the new `BaseUrlProviders` class.
A new `spring-boot-test-integration-test` module has also been
added to ensure hold the previous tests.
See gh-46356
Add the concept of a `BaseUrl` to the core `spring-boot-test`
module for use when making test HTTP calls. The web server module
provides `BaseUrlProvider` implementations that provide the actual
base URL (usually `https://localhost:<local-server-port>`).
Test utilities will be able to use `BaseUrlProviders` to find the
`BaseUrl`.
See gh-46356
Relocate `@AutoConfigureDataSourceInitialization` from
`spring-jdbc-test` to `spring-boot-test-autoconfigure`. This change
allows Flyway and Liquibase to respond to the annotation without
the user needing to remember the `spring-jdbc-test` dependency.
This is especially important for R2DB applications which may
still be using Flyway or Liquibase for migrations and will
want them to apply during tests.
See gh-46356
See gh-47322
Remove spring-boot-json-test module and spread code between
`spring-boot-test`, `spring-boot-test-autoconfigure` and JSON
technology modules.
See gh-46356
See gh-47322
Make `spring-boot-test-autoconfigure` optionally depend on
`spring-boot-autoconfigure` so that it can be an `api` dependency
for `*-test` modules. Also relocate it to core.
See gh-47322
Move `@PropertyMapping` and supporting code from the
`spring-boot-test-autoconfigure` module to `spring-boot-test`
since it's generally applicable.
See gh-46356
See gh-47322
Move `@TypeExcludeFilters` and supporting code from the
`spring-boot-test-autoconfigure` module to `spring-boot-test`
since it's generally applicable.
See gh-46356
See gh-47322
This commit moves the existing JDBC-based Spring Batch infrastructure
to a new 'spring-boot-batch-jdbc' module, while the existing module
only offers in-memory (aka resourceless) support.
The commit also updates the reference guide to provide some more
information about what's available and how to use it.
Closes gh-46307
The spring.jackson.read and spring.jackson.write properties are
JSON-specific. To make this more clear, this commit moves them
beneath spring.jackson.json. This also paves the way for
spring.jackson.cbor and spring.jackson.xml properties for CBOR- and
XML-specific settings should we add auto-configuration for XMLMapper
and/or CBORMapper in the future.
Closes gh-47328
This commit modularizes spring-boot-test-autoconfigure. It now
contains only the code that's central to test auto-configuration.
Feature-specific functionality has moved out into -test modules,
some existing and some newly created. For example, `@DataJpaTest` can
now be found in spring-boot-data-jpa-test.
Closes gh-47322
Prior to this commit, Spring Boot would use Framework's
`Jackson2ObjectMapperBuilder` to configure the `ObjectMapper` instance.
This builder would configure the `ProblemDetail` mixin automatically.
With the introduction of Jackson 3.x support, Spring Framework removed
its builder in favor of the native Jackson builder. As a result, the
mixin is not registered with the `JsonMapper` aymore.
This commit ensures that the mixin is registered if the `ProblemDetail`
class is present in the classpath.
Closes gh-47298
This commit removes all mentions of JUnit 4 from the Javadoc and
reference documentation. It also harmonizes to simply refers to JUnit.
Closes gh-47228
Update `JettyClientHttpRequestFactoryBuilder` and
`JettyClientHttpConnectorBuilder` with support for create the
`HttpClientTransport` from a factory function.
Closes gh-47251
Drop `isImmutable` and `getPrefix` from `OriginLookup` since
they're not really Origin concerns. Now that `env` is a
foundational layer we can add a dedicated `PropertySourceInfo`
interface and add that to the `o.s.b.env` package without
creating a package tangle.
Closes gh-45547
Move `AnsiOutputApplicationListener` from `o.s.b.context.config`
to `o.s.b.support` since it's more of a supporting class than a
context concern.
See gh-47232
Move the `EnvironmentPostProcessor` from `org.springframework.boot.env`
to `org.springframework.boot` so that we can make the `env` package
foundational.
Most `EnvironmentPostProcessor` implementation has also been relocated
to a new `org.springframework.boot.support` package.
See gh-47232
Move bootstrap code from `org.springframework.boot` to
`org.springframework.boot.bootstrap` and make them a foundational
layer.
This move helps reduce `org.springframework.boot.context.config`
dependencies to `org.springframework.boot`.
See gh-47232