746 Commits
Author SHA1 Message Date
Andy Wilkinson df5014a29d Revert "Temporarily add hints needed for Hibernate 7.2"
This reverts commit 1a4426a369.

Closes gh-48550
2026-01-20 18:05:52 +00:00
Johnny Lim 485b16ad0a Remove @ConditionalOnClass(Sniffer.class) on RestClientSnifferConfiguration
The condition is unnecessary as the sniifer is now included in the
same jar as the REST client itself.

See gh-48900

Signed-off-by: Johnny Lim <izeye@naver.com>
2026-01-20 09:59:59 +00:00
Andy Wilkinson 85f3f3856d Revert "Allow a custom JsonFactory to be used with JsonMapper.Builder"
This reverts commit 22d6f6a7de.

See gh-48594
2026-01-20 09:34:39 +00:00
Andy Wilkinson 6df1caf8f9 Auto-configure transactions when using spring-boot-kafka
spring-kafka has an api dependency on spring-tx, placing
the latter on the compile classpath of the former's consumers.
Additionally, when spring.kafka.producer.transaction-id-prefix is
set, the Kafka auto-configuration will define a Kafka-based
transaction manager. However, the transaction manager won't be used
without some configuration from the user as there's no dependency on
spring-boot-transaction and, therefore, no auto-configuration of
@EnableTransactionManagement.

This commit adds a spring-boot-transaction dependency to
spring-boot-kafka, aligning it with the spring-tx dependency that
spring-kafka already has.

Fixes gh-48880
2026-01-19 10:23:12 +00:00
Phillip Webb ea564d21e0 Ensure that the session same site defaults to "lax"
Remove the `always()` call from the same site mapping and replace `as`
with a direct call. This update means that mapping only occurs when
`getSameSite` is not `null`, but mapping can still be applied if
`sameSite.getAttributeValue()` returns `null`.

Closes gh-48830
2026-01-15 17:36:56 -08:00
Phillip Webb 5d2373eab8 Merge branch '3.5.x' into 4.0.x 2026-01-15 17:33:45 -08:00
Andy Wilkinson 625571c3d1 Fix MVC and WebFlux validator creation in a native image
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
2026-01-15 14:12:33 +00:00
Andy Wilkinson e8cea82772 Don't require …TestAutoConfiguration classes in imports file
See gh-48822
2026-01-15 12:01:46 +00:00
Andy Wilkinson bd4c43bf53 Make s-b-restclient test autoconfigs package-private
Fixes gh-48820
2026-01-15 11:54:57 +00:00
mspiess ce20e1ed20 Move schema.graphqls into test module
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
2026-01-15 11:20:54 +00:00
Andy Wilkinson 7af147d091 Fix CloudFoundry actuator auto-config in absence of RestTemplateBuilder
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
2026-01-14 15:45:08 +00:00
Andy Wilkinson e51fb2f8f0 Merge branch '3.5.x' into 4.0.x
Closes gh-48822
Fixes gh-48819
2026-01-14 11:25:01 +00:00
Andy Wilkinson 1d67f86dc5 Merge branch '3.5.x' into 4.0.x
Closes gh-48703
2026-01-08 13:45:21 +00:00
Andy Wilkinson 0ffffee4bf Upgrade to Nullability Plugin 0.0.9
Closes gh-48638
2026-01-08 11:59:51 +00:00
Andy Wilkinson 9bd1a460a1 Correct packaging of test code
Closes gh-48699
2026-01-08 11:43:43 +00:00
Phillip Webb 70ce043f80 Bind HttpServiceClientProperties directly
Update `HttpServiceClientProperties` to use direct binding rather than
using `@ConfigurationProperties`. The prevents metadata and IDE issues
and also allows the class API to be simplified.

Closes gh-48616
2026-01-07 17:39:56 -08:00
Andy Wilkinson 19be9b648f Remove unnecessary jetty-ee11-servlets dependency
Closes gh-48677
2026-01-07 09:21:30 +00:00
Phillip Webb 72aea01732 Make spring-boot-security module optional from spring-boot-cloudfoundry
Fixes gh-48685
2026-01-06 13:36:31 -08:00
Phillip Webb 581f648c3c Fix Assertions static imports
See gh-48630
2026-01-06 13:23:46 -08:00
Phillip Webb a4f35688aa Merge branch '3.5.x' into 4.0.x 2026-01-06 12:54:11 -08:00
Stéphane Nicoll 2e2981bfe4 Merge branch '3.5.x' into 4.0.x
Closes gh-48682
2026-01-06 12:35:34 +01:00
Stéphane Nicoll cb1596e8c8 Merge branch '3.5.x' into 4.0.x
Closes gh-48659
2026-01-02 14:02:59 +01:00
Stéphane Nicoll 1f4a8dff98 Restore RANDOM_PORT handing in tests with a separate management port
This commit fixes a regression where RANDOM_PORT was no longer honored
if a defined management port is set. Due to the modularization efforts,
the code has moved from an EnvironmentPostProcessor to an
ApplicationListener. Unfortunately, the listener is registered too
late to handle the event it is listening to. While the event type could
have been changed, the listener was added on the ApplicationContext
which are not honored before the ApplicationContext is in a state to be
used.

The contract of ContextCustomizerFactory is already giving us everything
we need. While the environment is post-processed later than we would
like, it is still post-processed before the refresh state so that the
additional property is honored.

This commit also adds an integration test to cover this scenario.

Closes gh-48653
2025-12-31 17:10:39 +01:00
Brian Clozel 9d1db6830f Fix message converter customizers order
Prior to this commit, gh-48310 separated client and server message
converter configurations by switching from message converter instances
as beans in the application context, to server/client customizers that
are applied to the `HttpMessageConverters` instances while being built.

This change did not order the new ClientHttpMessageConvertersCustomizer
or ServerHttpMessageConvertersCustomizer, letting those being at the
"lowest precedence" default. As customizers, this means they are applied
last and custom instances cannot take over.

This commit ensures that such customizers provided by Spring Boot are
now ordered at "0" to let applications ones take over.

Fixes gh-48635
2025-12-29 14:39:43 +01:00
Stéphane Nicoll 22d6f6a7de Allow a custom JsonFactory to be used with JsonMapper.Builder
This commit improves the auto-configuration of the JSonMapper.Builder
to accept a custom JsonFactory if a bean of this type is present.

Closes gh-48594
2025-12-29 13:11:03 +01:00
Stéphane Nicoll 2c55ccfa7f Provide Micrometer's observation test with micrometer test modules
Closes gh-48386
2025-12-27 10:05:32 +01:00
Stéphane Nicoll 9b7451ed9d Merge branch '3.5.x' into 4.0.x
Closes gh-48622
2025-12-26 09:01:59 +01:00
Moritz Halbritter 77807f53ee Add dependency to spring-boot-opentelemetry module
Closes gh-48585
2025-12-19 11:53:14 +01:00
Moritz Halbritter ce1efb02a1 Back off if spring-boot-micrometer-observation or spring-boot-micrometer-metrics is missing
Closes gh-48581
2025-12-19 11:25:32 +01:00
Stéphane Nicoll d489aa685c Polish "Update AOT tests to fail if deprecated code is not suppressed"
Include use of API that has been marked for removal.

See gh-48566
2025-12-17 15:41:26 +01:00
Stéphane Nicoll 8e895b3bc0 Update AOT tests to fail if deprecated code is not suppressed
Closes gh-48566
2025-12-17 15:30:44 +01:00
Stéphane Nicoll 15eaa461b2 Merge branch '3.5.x' 2025-12-17 15:01:27 +01:00
Craig Andrews f9f276bd46 JdbcSessionAutoConfiguration after DataSourceAutoConfiguration
JdbcSessionAutoConfiguration is conditional on the DataSource bean
which won't exist until after DataSourceAutoConfiguration; therefore,
JdbcSessionAutoConfiguration must auto-configure after
DataSourceAutoConfiguration.

Signed-off-by: Craig Andrews <candrews@integralblue.com>

See gh-48552
2025-12-17 10:32:41 +00:00
Stéphane Nicoll 2754aaef57 Suppress warnings in JsonMixin AOT-generated code
Closes gh-48564
2025-12-17 09:41:09 +01:00
Andy WilkinsonandChristoph Strobl 1a4426a369 Temporarily add hints needed for Hibernate 7.2
See gh-48518

Co-Authored-By: Christoph Strobl <christoph.strobl@broadcom.com>
2025-12-16 12:15:27 +00:00
Andy Wilkinson 495467dca6 Make OTLP logging connection details back off
Previously, the connection details would only back off if another
PropertiesOtlpLoggingConnectionDetails was defined. This commit
corrects this so that they will back of if any
OtlpLoggingConnectionDetails implementation is defined as a bean.

Closes gh-48536
2025-12-16 08:42:18 +00:00
Kai Zander fb05d82650 Fix order comment in WebMvcWebApplicationTypeDeducer
See gh-48543

Signed-off-by: Kai Zander <61500114+kzander91@users.noreply.github.com>
2025-12-16 09:14:34 +01:00
Phillip Webb da516741b2 Consider modules when deducing WebApplicationType
Introduce a strategy to `WebApplicationType` to allow modules to
implement deduction logic.

Prior to this commit, modules played no part in deducing the
`WebApplicationType`. This meant that a user with `spring-webflux`
for client purposes would deduce `REACTIVE` despite no
`spring-boot-webflux` module being present.

The following deduction logic order is now implemented:

1) If the `spring-boot-webmvc` module is being used and Spring MVC
   classes are found then `SERVLET` is used.

2) If the `spring-boot-webflux` module is being used and Spring WebFlux
   classes are found then `REACTIVE` is used.

3) If `spring-web` is found and servlet classes are available then
   `SERVLET` is used.

4) If none of the above are satisfied, `NONE` is used.

This commit also updates `SpringBootTestContextBootstrapper` to use
the same deduction logic.

Fixes gh-48517
2025-12-15 20:30:16 -08:00
Stéphane Nicoll 134ebe42a7 Merge branch '3.5.x'
Closes gh-48532
2025-12-15 15:15:11 +01:00
Andy Wilkinson 7b0abcbdb2 Decouple Session auto-configuration from ServerProperties
Fixes gh-48493
2025-12-11 15:34:22 +00:00
Brian Clozel 192efca36e Move ConditionalOnEnabledLoggingExport to opentelemetry module
This commit moves the `ConditionalOnEnabledLoggingExport` condition from
the "spring-boot-actuator-autoconfigure" to the
"spring-boot-opentelemetry" one, because without that the logging export
feature requires the actuator module to be on the classpath.

Fixes gh-48488
2025-12-10 12:40:44 +01:00
Stéphane Nicoll 72afdfd94a Merge branch '3.5.x'
Closes gh-48487
2025-12-10 10:24:08 +01:00
Tran Ngoc Nhan d00cb0b282 Allow Info to be built with null map values
See gh-48480

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-12-09 10:47:42 -08:00
Phillip Webb 1573104dfc Allow Info to be built with null map values
Fixes gh-48401
2025-12-08 11:55:37 -08:00
Stéphane Nicoll 14a67f7c6e Polish "Upgrade to Tomcat 11.0.15"
See gh-48467
2025-12-08 17:42:49 +01:00
Stéphane Nicoll 39b64a76c6 Upgrade to jOOQ 3.19.29
Closes gh-48464
2025-12-08 16:24:51 +01:00
Stéphane Nicoll a98b36efbb Start building against Spring Framework 7.0.2 snapshots
See gh-48439
2025-12-08 14:54:53 +01:00
Phillip Webb 2639d1ead5 Allow Info to be built with null values
Fixes gh-48401
2025-12-05 13:11:54 -08:00
Phillip Webb 739b92e525 Consider reactive indicators in HealthEndpointGroupMembershipValidator
Update `HealthEndpointGroupMembershipValidator` to also consider
reactive health indicators.

Fixes gh-48387
2025-12-04 14:09:21 -08:00
Phillip Webb e93f9c313c Guard against WebServerApplicationContext not being present
Update security matchers and WebFlux actuator support to guard against
the `WebServerApplicationContext` class not being present.

Fixes gh-48388
2025-12-03 22:41:32 -08:00