Skip to content

Commit 3de3629

Browse files
committed
Merge pull request #46547 from zakaria-shahen
* pr/46547: Polish "Mention the Virtual Threads changes in Java 24" Mention the Virtual Threads changes in Java 24 Closes gh-46547
2 parents 1e5afaf + f8c5f05 commit 3de3629

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/spring-application.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,11 @@ Spring Boot can also be configured to expose a xref:api:rest/actuator/startup.ad
400400
[[features.spring-application.virtual-threads]]
401401
== Virtual threads
402402

403-
If you're running on Java 21 or up, you can enable virtual threads by setting the property configprop:spring.threads.virtual.enabled[] to `true`.
403+
Virtual threads require Java 21 or later.
404+
For the best experience, Java 24 or later is strongly recommended.
405+
To enable virtual threads, set the configprop:spring.threads.virtual.enabled[] property to `true`.
404406

405-
Before turning on this option for your application, you should consider https://docs.oracle.com/en/java/javase/21/core/virtual-threads.html[reading the official Java virtual threads documentation].
407+
Before turning on this option for your application, you should consider https://docs.oracle.com/en/java/javase/24/core/virtual-threads.html[reading the official Java virtual threads documentation].
406408
In some cases, applications can experience lower throughput because of "Pinned Virtual Threads"; this page also explains how to detect such cases with JDK Flight Recorder or the `jcmd` CLI.
407409

408410
NOTE: If virtual threads are enabled, properties which configure thread pools don't have an effect anymore.

0 commit comments

Comments
 (0)