Following modularization, a presence check for ValidatorAdapter was
needed in the MVC and WebFlux auto-configuratiomn when creating
their Validators. Runtime hints to allow this check to work in a
native image were not added at the same time, resulting in the
class appearing to be absent. This caused message interpolation
for constraint violations to fail as newly created Validator was
being used which lacked the necessary MessageInterpolator
configuration.
This commit adds reflection hints for ValidatorAdapter, allowing
re-use of the context's main validator as the MVC and WebFlux
validators.
Fixes gh-48828
Spring Projects that have the `spring.graphql.schema.locations` property
set to `"classpath*:graphql/**/"` as suggested in the documentation have
failing GraphQL tests after upgrading to Spring Boot 4.
The `Query` type definition in the books-domain schema clashes with the
schema of the application. Presumably the books-domain schema was never
meant to exist in the exported JAR file. This commit moves it into the
test module to stop it from being exported and causing problems.
Signed-off-by: mspiess <30656914+mspiess@users.noreply.github.com>
See gh-48829
ResolvableType.NONE represents a type that does not exist and,
therefore could not be loaded. A bean of such a type cannot be
present in the BeanFactory so querying it for beans of that type
is pointless.
This commit updates OnBeanCondition to return immediately rather
than querying the BeanFactory by type for beans that we know cannot
be present.
Fixes gh-48836
Previously, a type in a bean condition was handled as a
ResolvableType. When the type was not present on the classpath
it would be represented as ResolvableType.NONE which renders as ?.
This resulted in some type information being omitted from the
condition evaluation report.
This commit introduces a pair, ByteType, the holds both the name of
the type as a String as well as the ResolvableType that represents
it. When that ResolvableType is NONE, the String name of the type
is used thereby avoiding the information loss.
Fixes gh-48835
Previously, CloudFoundryActuatorAutoConfiguration required
RestTemplateBuilder, using it to create the RestTemplate that's used
the security interceptor. Following the modularization,
RestTemplateBuilder is only present when spring-boot-restclient is on
the classpath. In its absence, CloudFoundryActuatorAutoConfiguration
would fail.
This commit address this problem by using RestClient.Builder (and
RestClient) instead of RestTemplateBuilder (and RestTemplate). This
allows CloudFoundryActuatorAutoConfiguration to work without
spring-boot-restclient as RestClient.Builder and RestClient are
provided by spring-web that will always be there in an MVC webapp.
Fixes gh-48826
At the time of writing, VirtualThreadSchedulerMXBean does not work in
a GraalVM native image (oracle/graal#12802). An attempt to retrieve
the MXBean results in an IllegalArgumentException being thrown. This
causes a failure when serializing ProcessInfo to JSON, breaking the
Actuator's info endpoint when management.info.process.enabled=true.
This commit updates ProcessInfo to be more defensive when working
with the MXBean. Now, if any exception is thrown, null will be
returned for the virtual threads info. This approach should allow the
functionality to work whenever a fix is made in Graal without
requiring further changes in Boot.
Fixes gh-48810
This is a follow-on from 9239447.
A recent change [1] in Spring Data Neo4j require us to configure the
use of an older dialect as we're testing with Neo4j 4 and the default
dialect now requires Neo4j 5.
See gh-48708
[1] f2d7ba7314
A recent change [1] in Spring Data Neo4j require us to configure the
use of an older dialect as we're testing with Neo4j 4 and the default
is now Neo4j 5.
See gh-48708
[1] f2d7ba7314