Commit Graph

884 Commits

Author SHA1 Message Date
Brian Clozel ef2a403df6 Add PropagationContextElement Kotlin operator
Prior to this commit, the Micrometer context-propagation project would
help propagating information from `ThreadLocal`, Reactor `Context` and
other context objects. This is already well supported for Micrometer
Observations.

In the case of Kotlin suspending functions, the processing of tasks
would not necessarily update the `ThreadLocal` when the function is
scheduled on a different thread.

This commit introduces the `PropagationContextElement` operator that
connects the `ThreadLocal`, Reactor `Context` and Coroutine `Context`
for all libraries using the "context-propagation" project.

Applications must manually use this operator in suspending functions
like so:

```
suspend fun suspendingFunction() {
  return withContext(PropagationContextElement(currentCoroutineContext())) {
    logger.info("Suspending function with traceId")
  }
}
```

Closes gh-35185
2025-09-09 21:42:08 +02:00
Sébastien Deleuze f8823ddc11 Polish JSP documentation
This commit ensures consistency with the documentation of other view
resolvers.

See gh-35444
2025-09-09 13:36:10 +02:00
Sébastien Deleuze dff489d0cf Refine JSP documentation contribution
This commit refines the JSP view resolver documentation contribution
by using tabs for Java and XML configuration, with Java displayed by
default.

Closes gh-35444
2025-09-09 13:28:17 +02:00
DongNyoung Lee 1abd1d767d Update mvc-jsp.adoc
See gh-35444
Signed-off-by: DongNyoung Lee <121621378+Dongnyoung@users.noreply.github.com>
2025-09-09 11:55:19 +02:00
rstoyanchev 9849094586 Merge branch '6.2.x' 2025-09-08 13:56:19 +01:00
rstoyanchev 736383e6cb Remove HttpServiceClient annotation
Closes gh-35431
2025-09-08 13:56:07 +01:00
rstoyanchev 977582fced Document data binding for functional endpoints
Closes gh-35367
2025-09-08 10:12:20 +01:00
Sam Brannen bce44b007d Document programmatic retry support in the reference manual
Closes gh-35436
2025-09-07 17:58:28 +02:00
Sam Brannen e53e413a21 Merge branch '6.2.x' 2025-09-03 14:53:20 +02:00
Sam Brannen 33fe8d29c1 Document potential need to use Mockito.doXxx() to stub a @⁠MockitoSpyBean
Closes gh-35410
2025-09-03 14:52:58 +02:00
Johnny Lim d32b7e9b4a Polish gh-35358
Signed-off-by: Johnny Lim <izeye@naver.com>
2025-09-02 23:13:27 +09:00
Brian Clozel 942fbf3032 Polishing contribution
Closes gh-34683
2025-09-01 11:50:22 +02:00
Sam Brannen 746fc335c2 Merge branch '6.2.x' 2025-08-29 17:25:56 +02:00
Sam Brannen b741632e99 Polish wording in web sections 2025-08-29 17:25:15 +02:00
Tran Ngoc Nhan cd208797e2 Fix links to Reactive Libraries and RestTemplate
Closes gh-35392

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-08-29 17:23:13 +02:00
Gustav a585beac49
Fix typo in websocket doc (#35393)
Signed-off-by: Gustav <69737612+gustaavv@users.noreply.github.com>
2025-08-29 13:17:18 +02:00
Sébastien Deleuze fdfd15b9b3 Refine null-safety tooling introduction
Closes gh-35383
2025-08-25 14:39:59 +02:00
Sam Brannen 9e9d716d7a Merge branch '6.2.x' 2025-08-23 13:46:25 +02:00
Daniel Garnier-Moiroux ed7c3d737c Fix broken link in WebDriver docs
Closes gh-35374

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2025-08-23 13:41:40 +02:00
Brian Clozel d128dd2616 Make StartupStep AutoCloseable
This commit mames `StartupStep` extend `AutoCloseable` in order to allow
the try/with resources syntax and making the `step.end()` call
transparent.

Closes gh-35277
2025-08-22 19:24:11 +02:00
NeatGuyCoding 57fa52262e
Fix @⁠HttpServiceClient example in reference manual
Closes gh-35363

Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com>
2025-08-21 12:09:34 +02:00
Sam Brannen 472f844256 Merge branch '6.2.x' 2025-08-20 16:42:56 +02:00
Sam Brannen 19d5ec6781 Improve documentation for ApplicationEvents to clarify recommended usage
See gh-35335
2025-08-20 16:42:22 +02:00
Sam Brannen 5d214c2624 Polishing 2025-08-20 16:31:41 +02:00
Brian Clozel 208bb48254 Document OpenTelemetry HTTP server convention
Closes gh-35358
2025-08-20 16:16:26 +02:00
Brian Clozel fce7b3d420 Remove Undertow-specific support and testing
Undertow does not support Servlet 6.1, we need to remove compatibility
tests as well as Undertow-specific classes for WebSocket and reactive
support.

Closes gh-35354
2025-08-20 10:32:33 +02:00
Sam Brannen 5d325ca0fc Improve wording for transactional rollback rule semantics
Closes gh-35346
2025-08-19 13:32:35 +02:00
Sébastien Deleuze c6f1f719c3 Formatting issue in RestTestClient documentation
Closes gh-35328
2025-08-14 15:59:28 +02:00
rstoyanchev 83b7bef572 Polishing contribution
Closes gh-35227
2025-08-12 06:57:28 +01:00
Fabrice Bibonne bfcf4ea818 Document HTTP range request constraints
See gh-35227

Signed-off-by: Fabrice Bibonne <fabrice.bibonne@gmail.com>
2025-08-12 06:57:28 +01:00
Juergen Hoeller 876b7d4209 Upgrade to Hibernate ORM 7.1
Closes gh-35308
2025-08-11 22:43:02 +02:00
Juergen Hoeller 29203d7293 Merge branch '6.2.x' 2025-08-11 14:34:17 +02:00
Juergen Hoeller a9453a5959 Polishing 2025-08-11 14:32:45 +02:00
rstoyanchev a0542f023c Merge branch '6.2.x' 2025-08-08 11:50:58 +01:00
rstoyanchev 6e2fbfe108 Polishing contribution
Closes gh-35232
2025-08-08 11:50:07 +01:00
秦利斌 968e037503 Add documentation of RequestMapping about SpEL
Signed-off-by: 秦利斌 <68638598+Allan-QLB@users.noreply.github.com>
2025-08-08 11:37:25 +01:00
Juergen Hoeller 2f262afc51 Add documentation section on proxy type defaults and @Proxyable
See gh-35286
See gh-35296
2025-08-06 21:11:07 +02:00
Sam Brannen 61df497785 Revise reference docs regarding new ApplicationContext pause() support
See gh-35269
2025-08-04 12:05:26 +03:00
Brian Clozel ec87d90c9b Post process outgoing messages in JMS clients
Prior to this commit, the `JmsTemplate` would use `MessagePostProcessor`
for mutating JMS messages before they are being sent, but only if the
method takes a post processor as an argument.
The main use case so far is to mutate messages after they've been
created by a `MessageConverter` from a payload.

This commit updates the `JmsClient` to use `MessagePostProcessor` more
broadly, for all outgoing messages (converted or not). This brings an
interception-like mechanism for clients to enrich the message before
being sent.

This change also updates the `JmsClient` static factories and
introduces a Builder, allowing for more configuration options: multiple
message converters and message post processors.

Closes gh-35271
2025-08-01 15:40:32 +02:00
rstoyanchev 87838aa4c5 PathApiVersionResolver is not nullable
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
Closes gh-35265
2025-07-31 15:32:12 +01:00
rstoyanchev 08ccf46399 Rename request param version strategy to query param
Closes gh-35263
2025-07-31 15:32:12 +01:00
rstoyanchev d661550b48 Update docs for HttpServiceClient
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
Closes gh-35244
2025-07-31 05:22:49 +01:00
rstoyanchev 4ae5d0d1fe Polishing in RestTestClient reference docs
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
Closes gh-34428
2025-07-30 07:13:48 +01:00
Rob Worsnop 37dcca54d2 Add RestTestClient
See gh-34428

Signed-off-by: Rob Worsnop <rworsnop@gmail.com>
2025-07-30 07:13:48 +01:00
Juergen Hoeller c7fbf7809f Provide @WebSocketScope annotation and public SCOPE_WEBSOCKET constant
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Has been cancelled Details
Deploy Docs / Dispatch docs deployment (push) Has been cancelled Details
Build and Deploy Snapshot / Verify (push) Has been cancelled Details
Closes gh-35235
2025-07-26 11:38:02 +02:00
Brian Clozel d06255214e Support wildcard path elements at the start of path patterns
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
Prior to this commit, the `PathPattern` and `PathPatternParser` would
allow multiple-segments matching and capturing with the following:

* "/files/**" (matching 0-N segments until the end)
* "/files/{*path}" (matching 0-N segments until the end and capturing
  the value as the "path" variable)

This would be only allowed as the last path element in the pattern and
the parser would reject other combinations.

This commit expands the support and allows multiple segments matching at
the beginning of the path:

* "/**/index.html" (matching 0-N segments from the start)
* "/{*path}/index.html" (matching 0-N segments until the end and capturing
  the value as the "path" variable)

This does come with additional restrictions:

1. "/files/**/file.txt" and "/files/{*path}/file.txt" are invalid,
   as multiple segment matching is not allowed in the middle of the
   pattern.
2. "/{*path}/files/**" is not allowed, as a single "{*path}" or "/**"
   element is allowed in a pattern
3. "/{*path}/{folder}/file.txt"  "/**/{folder:[a-z]+}/file.txt" are
   invalid because only a literal pattern is allowed right after
   multiple segments path elements.

Closes gh-35213
2025-07-25 13:24:18 +02:00
rstoyanchev 6f5a7eed76 Add section on Range requests to reference
Closes gh-35052
2025-07-16 13:50:41 +01:00
Sam Brannen 7d628b6298 Polish Resilience Features section of reference manual 2025-07-15 10:39:49 +02:00
Sam Brannen dbe89abd7b Pause unused application contexts in the TestContext framework
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
Since the introduction of the Spring TestContext Framework in 2007,
application contexts have always been stored in the context cache in a
"running" state. However, leaving a context running means that
components in the context may continue to run in the background. For
example, JMS listeners may continue to consume messages from a queue;
scheduled tasks may continue to perform active work, etc.; and this can
lead to issues within a test suite.

To address such issues, this commit introduces built-in support for
pausing application contexts when they are not in use and restarting
them if they are needed again.

Specifically, the TestContextManager now marks a test's application
context as "unused" after execution of the test class has ended, and
the underlying ContextCache then "stops" the application context if no
other test class is currently using the context. When a
TestExecutionListener later attempts to obtain a paused application
context -- for example, for a subsequent test class that shares the
same application context -- the ContextCache ensures that context is
restarted before returning it.

See https://github.com/spring-projects/spring-boot/issues/28312
See gh-35171
Closes gh-35168
2025-07-14 18:29:02 +02:00
Sam Brannen f3757cedb9 Polish context caching section 2025-07-14 18:27:01 +02:00