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
Refactor `PropertyMapper` so that it no longer calls adapter or
predicate methods by default when the source value is `null`. This
effectively makes all default calls the same as using
`alwaysWhenNotNull` in the previous generation of the code.
For the limited times when you do need to deal with `null` values, the
new `always()` method can be used.
For example,
map.from(source::method).to(destination::method);
Will not call `destination.method(...)` if `source.method()` returns
`null`.
Where as:
map.from(source::method).always().to(destination::method);
Will call `destination.method(null)` if `source.method()` returns
`null`.
This update provides clearer semantics for the API and allows for better
JSpecify nullability annotations. It has also simplified much of our
existing property mapper code.
Closes gh-47024
Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
Spring Boot 4 requires Jakarta EE 11. Jersey 4 will support EE 11 but
its release schedule is uncertain. Furthermore, Jersey does not yet
support Jackson 3 and there's no clear timeline for when Jackson 3
will be supported.
In light of the above, this commit removes support for Jersey.
Reinstating support can be considered once there's a Jersey GA that
supports Jakarta EE 11 or its clear that one will be available in
time for Boot's GA in November. Ideally, support for Jackson 3 would
also be available before reinstating Jersey support.
Closes gh-47017
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