Commit Graph
334 Commits
Author SHA1 Message Date
Moritz Halbritter 3f7cebd802 Polish "Allow configuring Micrometer Tracing MDC keys"
Derive logging.pattern.correlation from the configured MDC keys so that
log correlation keeps working when the keys are customized, instead of
silently rendering a blank correlation field.

Reject empty MDC keys and only clear Brave's default correlation fields
when the keys have been customized, so that applications using the
defaults are unaffected if Brave adds a default field.

Replace the tests that asserted on bean wiring with integration tests
covering the MDC contents, plus a smoke test for the log output.

See gh-50595
2026-08-25 13:54:00 +02:00
Stéphane Nicoll aff4736a79 Merge branch '4.1.x'
Closes gh-51347
2026-08-11 08:38:01 +02:00
Stéphane Nicoll 2fae1aa41d Merge branch '4.0.x' into 4.1.x
Closes gh-51346
2026-08-11 08:11:18 +02:00
Stéphane Nicoll 2abe872e37 Fix hostname verification failure in Elasticsearc smoke test
Regenerate the self-signed test certificate with CN=localhost as the
JDK enforces RFC 6125 wildcard rules and no longer accepts a bare "*" as
a match-any-host pattern. Thus far it worked because HttpClient5 did
not delegate hostname verification to the JDK in some cases.

Closes gh-51345
2026-08-11 08:05:47 +02:00
Stéphane Nicoll 6dc87d9d17 Merge branch '4.1.x'
Closes gh-51291
2026-08-07 11:18:17 +02:00
Stéphane Nicoll bf461b085d Backoff from exposing gRPC server port if gRPC is not available
This moves the feature from a unconditional application listener that
can load gRPC types to an auto-configuration that backs off if the
necessary classes are not present.

Also updated the smoke tests to actually use the feature.

Closes gh-50825
2026-08-07 11:13:32 +02:00
Brian Clozel 2f9933e3cb Replace TestRestTemplate with RestTestClient in smoke tests
Before deprecating `TestRestTemplate`, we must first stop using it in
smoke tests and replace it with:
* `RestTestClient` when the Spring MVC infrastructure is present
* `RestClient` when the test does not have Spring MVC on classpath

See gh-46632
2026-07-27 16:09:12 +02:00
Stéphane Nicoll 3959c56bdd Deprecate RestTemplate support
With Spring Framework 7.1 deprecating RestTemplate for removal, this
commit deprecates our supporting infrastructure as well, and steers
users towards RestClient instead:

* RestTemplateAutoConfiguration and
  RestTemplateObservationAutoConfiguration
* RestTemplateBuilder, RestTemplateBuilderConfigurer, and
  RestTemplateBuilderClientHttpRequestInitializer
* RestTemplateCustomizer, RestTemplateRequestCustomizer, and
  ObservationRestTemplateCustomizer
* MockRestServiceServerAutoConfiguration,
  MockServerRestTemplateCustomizer, and RootUriRequestExpectationManager
  in the test support module

The reference documentation no longer covers RestTemplate and now
solely documents RestClient and WebClient. Code snippets and sample
tests that only existed to illustrate RestTemplate usage have been
removed accordingly.

Closes gh-51118
2026-07-25 08:32:32 +02:00
Stéphane Nicoll ca67fcb642 Merge branch '4.1.x'
Closes gh-51122
2026-07-24 15:19:38 +02:00
Stéphane Nicoll 9821dade80 Merge branch '4.0.x' into 4.1.x
Closes gh-51121
2026-07-24 15:19:14 +02:00
Stéphane Nicoll b9ebff0084 Use RestClient in tests and infrastructure code
Closes gh-51120
2026-07-24 15:10:43 +02:00
Stéphane Nicoll 21f7390944 Polish "Add AMQP 1.0 RabbitMQ auto-configuration"
See gh-49857
2026-07-15 18:11:53 +02:00
Eddú Meléndez 0ed57a6109 Add AMQP 1.0 RabbitMQ auto-configuration
See gh-49857

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2026-07-15 18:11:45 +02:00
Stéphane Nicoll b5ba1ec85c Add AMQP 1.0 generic auto-configuration
This commit adds auto-configuration for the generic AMQP 1.0 client
in Spring AMQP 4.1, using Qpid ProtonJ. Support for connection factory,
client and listener endpoints are available.

The "spring.amqp" namespace exposes settings to connect to an AMQP 1.0
compliant broker and customize client and listeners settings. Docker
compose and testcontainers support using RabbitMQ, ActiveMQ, and Artemis
have been added too.

Closes gh-49678
2026-07-15 15:21:10 +02:00
Stéphane Nicoll f48cc3ac10 Move Spring AMQP 0.9 support to spring-boot-rabbitmq
Now that Spring AMQP supports AMQP 1.0 as well, we need to straighten
out our existing support. AMQP 0.9 is RabbitMQ specific, so we can no
longer refer it to "amqp". This commit migrates the existing support
to spring-boot-rabbitmq and renames the starters as well.

For continuity, users should migrate from "spring-boot-starter-amqp"
to "spring-boot-starter-rabbitmq". While the root package has been
changed for consistency, most names are the same, including
configuration properties still in the "spring.rabbitmq" namespace.

Keys to configure the version of the RabbitMQ clients have migrated to
'rabbitmq.client' and 'rabbitmq.stream.client' respectively.

Closes gh-49677
2026-07-15 15:10:09 +02:00
Andy Wilkinson c5261cf0eb Merge branch '4.0.x'
Closes gh-50878
2026-06-28 12:14:56 +01:00
Yanming Zhou dff33aec55 Remove unnecessary @Nullables from local variable declarations
See gh-50866

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2026-06-28 10:39:07 +01:00
Andy Wilkinson 6a74bb85a3 Merge branch '4.0.x'
Closes gh-50440
2026-05-14 15:03:44 +01:00
Andy Wilkinson add52b6ccd Merge branch '3.5.x' into 4.0.x
Closes gh-50439
2026-05-14 15:02:24 +01:00
Andy Wilkinson 9446dbb106 Merge branch '4.0.x'
Closes gh-50357
2026-05-07 15:46:35 +01:00
Andy Wilkinson 5257df1bb1 Take async cache writes into consideration
Since Spring Data Redis 4.0 and when using Lettuce, entries may be
written to the cache asynchronously. This means that they may not
be immediately visible to a subsequent read. This commit adapts the
test to use Awaitility to wait for the expected entry to become
visible in the cache.

Closes gh-50356
2026-05-07 15:42:50 +01:00
Andy Wilkinson 9f97f11964 Merge branch '4.0.x'
See gh-50279
2026-05-02 07:12:08 +01:00
Andy Wilkinson ee6f1e6256 Merge branch '3.5.x' into 4.0.x
See gh-50278
2026-05-02 07:11:37 +01:00
Phillip Webb 3bafd4994e Document gRPC support
Closes gh-49291
2026-04-21 20:03:28 -07:00
Phillip Webb 9bf698d564 Add missing gRPC test starters
Add `spring-boot-starter-grpc-client-test` and
`spring-boot-starter-grpc-server-test` to align with the client
and server modules. Also refine dependencies for common test
usage patterns.

`spring-boot-starter-grpc-server-test` has been removed.

Closes gh-49690
2026-04-21 20:01:05 -07:00
Phillip Webb 6f409f7dd6 Polish code for upcoming Spring Security nullability changes
Update code and tests in preparation of upcoming Spring Security
`Nullable` annotation updates.
2026-04-07 22:27:19 -07:00
Eric Haag e0aa86fdb3 Improve GenerateProtoTask relocatability by clearing javaExecutablePath
Clears the `javaExecutablePath` on the Protobuf extension. This prevents
absolute Java installation paths from being tracked as task inputs,
avoiding cross-machine build cache misses and ensuring the task is fully
relocatable. This is safe because `protoc` and `grpc` are configured
to use native binaries rather than executable JARs.

See: https://github.com/google/protobuf-gradle-plugin/issues/785

Signed-off-by: Eric Haag <ehaag@gradle.com>

See gh-49842
2026-04-07 10:17:11 +01:00
Moritz Halbritter 09ece896a5 Merge branch '4.0.x'
Closes gh-49870
2026-04-02 11:16:36 +02:00
Moritz Halbritter d437c11761 Merge branch '3.5.x' into 4.0.x
Closes gh-49869
2026-04-02 11:12:20 +02:00
Moritz Halbritter dc375134f9 Merge branch '4.0.x'
Closes gh-49867
2026-04-02 10:47:07 +02:00
Moritz Halbritter 4f47202910 Merge branch '3.5.x' into 4.0.x
Closes gh-49866
2026-04-02 10:46:26 +02:00
Moritz Halbritter c56cbd46b2 Map OpenTelemetry environment variables to properties
Closes gh-48799
2026-03-30 15:28:42 +02:00
Stéphane Nicoll 5296a5bbfd Revert "Rename spring-boot-amqp to spring-boot-rabbitmq"
This reverts commit 72b8a6ca05,
b820d9feac, and
edadf816ab.

See gh-49620
2026-03-20 11:03:28 +01:00
Phillip Webb 328e91b492 Use testcontains mechanism to find access local gRPC address
See gh-49540
2026-03-19 16:47:06 -07:00
Chris BonoandPhillip Webb 1cb8d02ed7 Add Spring gRPC server and client security support
Add auto-configuration to integrate gRPC server applications
with Spring Security. This commit provides both standard
Spring Security support as well as OAuth support.

Closes gh-49047

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2026-03-19 15:12:31 -07:00
Chris BonoandPhillip Webb be3a1b7117 Add Spring gRPC test support
Add a testing module that can be used for testing Spring gRPC
server or client applications.

Closes gh-49046

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2026-03-19 15:12:30 -07:00
Chris BonoandPhillip Webb c35b21adb4 Add Spring gRPC client support
Add support for Spring gRPC client applications.

Closes gh-49045

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2026-03-19 15:12:30 -07:00
Chris BonoandPhillip Webb e61bb6df5b Add Spring gRPC server support
Add support for Spring gRPC server applications.

Closes gh-49044

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2026-03-19 15:12:30 -07:00
Stéphane NicollandEddú Meléndez edadf816ab Rename package for RabbitMQ support
This commit renames the RabbitMQ root packages from amqp to rabbitmq.

See gh-49620

Co-authored-by: Eddú Meléndez <eddu.melendez@gmail.com>
2026-03-19 08:04:16 +01:00
Stéphane NicollandEddú Meléndez b820d9feac Harmonize support to refer to RabbitMQ
This commit adapts description to refer to RabbitMQ rather than AMQP.

See gh-49620

Co-authored-by: Eddú Meléndez <eddu.melendez@gmail.com>
2026-03-19 08:04:16 +01:00
Stéphane NicollandEddú Meléndez 72b8a6ca05 Migrate Spring RabbitMQ support to spring-boot-rabbitmq
See gh-49620

Co-authored-by: Eddú Meléndez <eddu.melendez@gmail.com>
2026-03-19 08:04:14 +01:00
Andy Wilkinson 684e279d6f Merge branch '4.0.x'
Closes gh-49618
2026-03-16 18:01:32 +00:00
Andy Wilkinson 797253a447 Merge branch '3.5.x' into 4.0.x
Closes gh-49617
2026-03-16 18:00:39 +00:00
Stéphane Nicoll b12d40e8e5 Add support for Spring Batch MongoDB
This commit adds support for running Spring Batch jobs with a MongoDB
store. It aligns as much as possible to the JDBC counterpart, with
spring-boot-starter-batch-data-mongodb and spring-boot-starter-batch-data-mongodb-test.

As we do not have a way to initialize a MongoDB store at the moment,
this commit adds a conservative approach of executing commands defined
by the standard Spring Batch schema script.

Closes gh-43236
2026-03-16 12:11:19 +01:00
Brian Clozel 4b11e04e78 Deprecate RestTemplateBuilder#rootUri with replacement
This commit deprecates both `RootUriTemplateHandler` and
`RootUriBuilderFactory` types, along their usage in places like
`RestTemplateBuilder`.

`RestTemplateBuilder#rootUri` is now deprecated in favor of
`RestTemplateBuilder#baseUri`, which leverages Framework's
`DefaultUriBuilderFactory`.

Closes gh-48350
2026-02-24 16:18:09 +01:00
Phillip Webb 280af06373 Polish 2026-02-18 15:10:07 -08:00
Stéphane Nicoll f4156197b5 Fix checks 2026-02-18 08:17:51 +01:00
Phillip Webb 1d054e8a12 Ensure HttpMessageConverters are configured before RestClients
Update `RestClientAutoConfiguration` to ensure that it applies after
`HttpMessageConvertersAutoConfiguration`.

Prior to this commit, the `HttpMessageConvertersRestClientCustomizer`
bean might not get created due to the `@ConditionalOnBean` guard not
finding any `ClientHttpMessageConvertersCustomizer` beans.

Since the issue is surprising hard to replicate in a unit test, a new
smoke test has been added to ensure the problem doesn't return.

Fixes gh-49223
2026-02-17 22:26:02 -08:00
Andy Wilkinson 3100599005 Upgrade to Hibernate 7.2.1.Final
Closes gh-48857
2026-01-15 15:36:17 +00:00
Andy Wilkinson 0ffffee4bf Upgrade to Nullability Plugin 0.0.9
Closes gh-48638
2026-01-08 11:59:51 +00:00