Commit Graph
61040 Commits
Author SHA1 Message Date
Phillip Webb 2fffebe214 Reduce garbage of repeated WritableJson.toByteArray() calls
Update the default implementation of `WritableJson.toByteArray()`
to reduce the amount of garbage created from repeated calls.

Prior to this commit, each call would create a new
`ByteArrayOutputStream` and `OutputStreamWriter` to create the
byte array. Writing structured JSON results in many calls to
the `toByteArray()` method, which means we repeatedly create
and destroy the `ByteArrayOutputStream` and `OutputStreamWriter`
objects. Furthermore, both contain buffers that are often
expanded and will overlap with each other.

The updated implementation uses a custom `Appendable`
implementation that uses a single `ByteBuffer` buffer. It also
has a `ThreadLocal` cache so that repeated calls from the same
thread can reuse the buffer. The cache uses a `SoftReference`
to ensure that the JVM can reclaim space if needed (for example,
if a large JSON line was written).

Closes gh-49428
2026-04-30 12:04:39 -07:00
Phillip Webb 72b176e85b Fix Spring gRPC documentation links 2026-04-30 10:59:08 -07:00
Andy Wilkinson 1d109887c4 Merge branch '4.0.x'
Closes gh-50261
2026-04-30 13:45:24 +01:00
Andy Wilkinson fc67e24820 Merge branch '3.5.x' into 4.0.x
Closes gh-50260
2026-04-30 13:44:06 +01:00
Andy Wilkinson 03eb75fbad Merge pull request #50095 from dlwldnjs1009
* gh-50095:
  Always match the links endpoint with GET

Closes gh-50095
2026-04-30 13:43:20 +01:00
Lee JiWon 2d3273e078 Always match the links endpoint with GET
The links endpoint only supports GET, so its matcher is now hardcoded
to GET. withHttpMethod(...) continues to apply only to endpoint paths
and the behaviour is documented on its javadoc.

Signed-off-by: Lee JiWon <dlwldnjs1009@gmail.com>

See gh-50095
2026-04-30 13:34:11 +01:00
Andy Wilkinson e7d11afe45 Merge branch '4.0.x'
Closes gh-50258
2026-04-30 12:38:09 +01:00
Andy Wilkinson a0a344f4b4 Merge branch '3.5.x' into 4.0.x
Fixes gh-50257
2026-04-30 12:35:30 +01:00
Andy Wilkinson d2b62bc64f Fix CORS configuration in /cloudfoundryapplication security filter
Previously, Spring Security wouldn't necessary allow cross-origin
requests to /cloudfoundryapplication, despite the underlying handler
mapping doing so.

Since 6.2, Spring Security enables CORS with default configuration if
there are any UrlBasedCorsConfigurationSource beans in the context.
This default configuration will then use a bean named
corsConfigurationSource as its source of CORS configuration. If it
doesn't find such a bean, it'll use the mvcHandlerMappingIntrospector
bean as a source. This latter case works as it means that the
CORS configuration of the underlying handler mapping is used.

In the case where a bean named corsConfigurationSource is used, this
will break /cloudfoundryapplication if the bean's CORS configuration
for /cloudfoundryapplication does not allow it. This has only been
a problem since Spring Boot 3.5 where we switched from using
ignoring() to using permitAll() to configure the security of
/cloudfoundryapplication.

To avoid a user-provided bean named corsConfigurationSource from
accidentally preventing access to /cloudfoundryapplication, we now
explicitly configure the filter chain's CORS support to use the same
CorsConfigurationSource as the handler mapping.

Fixes gh-50254
2026-04-30 12:29:34 +01:00
Andy Wilkinson b744839f53 Merge branch '4.0.x' 2026-04-29 12:25:44 +01:00
Andy Wilkinson bd568905c0 Merge branch '3.5.x' into 4.0.x 2026-04-29 12:25:35 +01:00
Andy Wilkinson efeb44a400 Test the Gradle plugin against Gradle 9.5.0
Closes gh-50238
2026-04-28 16:05:30 +01:00
Andy Wilkinson 17e73a04a5 Merge branch '4.0.x'
Closes gh-50237
2026-04-28 15:55:30 +01:00
Andy Wilkinson ec7b9d4124 Upgrade to Gradle 9.5.0
Closes gh-50236
2026-04-28 15:37:37 +01:00
Stéphane Nicoll 0e2f7e2b1a Merge branch '4.0.x'
Closes gh-50234
2026-04-28 13:54:58 +02:00
Stéphane Nicoll 813913ccb8 Merge branch '3.5.x' into 4.0.x
Closes gh-50233
2026-04-28 13:54:49 +02:00
Stéphane Nicoll fa8765717d Merge pull request #50225 from ares333
* patch-1:
  Polish "Keep milliseconds precision in ThreadPoolTaskScheduleBuilder"
  Keep milliseconds precision in ThreadPoolTaskScheduleBuilder

Closes gh-50225
2026-04-28 13:54:40 +02:00
Stéphane Nicoll 08c94440fd Polish "Keep milliseconds precision in ThreadPoolTaskScheduleBuilder"
See gh-50225
2026-04-28 13:49:59 +02:00
Ares 805e8af8d5 Keep milliseconds precision in ThreadPoolTaskScheduleBuilder
This commit fixes ThreadPoolTaskExecutorBuilder#awaitTerminationPeriod
so that it does not lose millisecond precision.

See gh-50225

Signed-off-by: Ares <ares333@users.noreply.github.com>
2026-04-28 13:46:08 +02:00
Moritz Halbritter 56059cf6a1 Fix typo 2026-04-27 11:52:39 +02:00
Stéphane Nicoll f5afe3e8ed Merge branch '4.0.x' 2026-04-27 11:06:10 +02:00
Stéphane Nicoll 684bce02a9 Remove merged artifact that was relocated 2026-04-27 11:06:01 +02:00
Stéphane Nicoll eef5231ebd Merge branch '4.0.x' 2026-04-27 11:05:29 +02:00
Stéphane Nicoll 4c7cedb738 Merge branch '3.5.x' into 4.0.x
Closes gh-50229
2026-04-27 11:04:35 +02:00
Stéphane Nicoll 37186284e4 Fix name of ReactiveOAuth2ResourceServerJwkConfiguration
Closes gh-50226
2026-04-27 11:01:09 +02:00
Stéphane Nicoll 9c6d5d3ecf Merge branch '4.0.x'
Closes gh-50228
2026-04-27 10:59:42 +02:00
Stéphane Nicoll f71464b3c6 Merge branch '3.5.x' into 4.0.x
Closes gh-50227
2026-04-27 10:57:41 +02:00
Stéphane Nicoll fab53cce04 Merge pull request #50118 from vinhhieu21
* fix-jws-algorithm-null-add:
  Polish "Reject unknown JWS algorithms configured on NimbusJwtDecoder"
  Reject unknown JWS algorithms configured on NimbusJwtDecoder

Closes gh-50118
2026-04-27 10:55:30 +02:00
Stéphane Nicoll 73a7b7727d Polish "Reject unknown JWS algorithms configured on NimbusJwtDecoder"
See gh-50118
2026-04-27 10:19:00 +02:00
Hieu Bui Vinh 3f32906b05 Reject unknown JWS algorithms configured on NimbusJwtDecoder
See gh-50118

Signed-off-by: Hieu Bui Vinh <buivinhhieu217@gmail.com>
2026-04-27 10:18:33 +02:00
Stéphane Nicoll 9ad6722f00 Add dependency management for spring-boot-web-server-test
Closes gh-50224
2026-04-26 21:20:35 +02:00
Stéphane Nicoll 56396666ed Polish ordering 2026-04-26 21:20:15 +02:00
Stéphane Nicoll ba0e76f9fc Merge pull request #50223 from eddumelendez
* add-starter-batch-data-mongodb:
  Add missing dependency management for Spring Batch

Closes gh-50223
2026-04-26 17:59:22 +02:00
Eddú Meléndez 4a12662a7e Add missing dependency management for Spring Batch
See gh-50223

Signed-off-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
2026-04-26 17:57:16 +02:00
Stéphane Nicoll 5b9798704c Merge branch '4.0.x'
Closes gh-50220
2026-04-25 11:47:44 +02:00
Stéphane Nicoll 6093fd42cb Merge branch '3.5.x' into 4.0.x
Closes gh-50219
2026-04-25 11:47:30 +02:00
Stéphane Nicoll eceb603342 Merge pull request #50210 from henriquejsza
* gh-35236-testcontainers-lifecycle-docs:
  Polish "Document Testcontainers lifecycle caveat"
  Document Testcontainers lifecycle caveat

Closes gh-50210
2026-04-25 11:47:02 +02:00
Stéphane Nicoll 2df7f83ceb Polish "Document Testcontainers lifecycle caveat"
See gh-50210
2026-04-25 11:46:42 +02:00
henriquejsza 69ddf5856f Document Testcontainers lifecycle caveat
Document how Testcontainers-managed static containers can be stopped
before Spring's cached application context is closed or reused.

See gh-50210

Signed-off-by: henriquejsza <henriquejsza@gmail.com>
2026-04-25 11:46:38 +02:00
Stéphane Nicoll 7490a087e6 Merge branch '4.0.x' 2026-04-25 11:25:47 +02:00
Stéphane Nicoll 8a720b6bc5 Merge branch '3.5.x' into 4.0.x 2026-04-25 11:25:41 +02:00
Stéphane Nicoll 6d4a3e7592 Fix reference to Jetty classes 2026-04-25 11:23:55 +02:00
Stéphane Nicoll 83ef0146f4 Merge branch '4.0.x'
Closes gh-50218
2026-04-25 11:22:09 +02:00
Stéphane Nicoll 3283c9264f Merge branch '3.5.x' into 4.0.x
Closes gh-50217
2026-04-25 11:21:07 +02:00
Stéphane Nicoll 2dfcbd795c Merge pull request #17144 from zxuhan7
* gh-17144-document-jetty-multiple-connectors:
  Polish "Document configuring multiple connectors with Jetty"
  Document configuring multiple connectors with Jetty

Closes gh-17144
2026-04-25 11:14:35 +02:00
Stéphane Nicoll 796ac7870d Polish "Document configuring multiple connectors with Jetty"
See gh-17144
2026-04-25 11:09:57 +02:00
zxuhan7 f9c0c65622 Document configuring multiple connectors with Jetty
See gh-17144

Signed-off-by: zxuhan7 <zxuhan7@gmail.com>
2026-04-25 10:52:45 +02:00
Stéphane Nicoll ad1795bdc2 Merge branch '4.0.x'
Closes gh-50216
2026-04-25 10:40:20 +02:00
Stéphane Nicoll dfabb012e8 Merge branch '3.5.x' into 4.0.x
Closes gh-50215
2026-04-25 10:37:05 +02:00
Stéphane Nicoll 466e11ba06 Merge pull request #50205 from kwondh5217
* fix/whitelabel-timestamp-html-escaping:
  Polish contribution
  Apply HTML escaping to timestamp attribute in Whitelabel error page

Closes gh-50205
2026-04-25 10:33:38 +02:00