PrepZone Logo
PrepZone
Back to Spring Boot

Spring Boot · Medium

How do virtual threads work in Spring Boot 3.2+? When should you enable them?

Spring BootModern Spring Boot 3.xVirtual ThreadsSenior

Answer preview

Virtual threads (Project Loom, Java 21+) are lightweight threads managed by the JVM instead of the OS. Spring Boot 3.2+ can route Tomcat request handling, @Async, and scheduled tasks onto virtual threads with a single property.…