Skip to content
Ameen Abozaid
Planned lessonMID-007-L03

Virtual threads in Spring Boot

  • Lesson 3 of 6
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

turn them on and measure.

Planned topics

  • Requires a JDK with virtual threads and a Spring Boot version that supports them (verify version before recording).
  • Enable with spring.threads.virtual.enabled=true; request handling and async executors then use virtual threads.
  • Existing blocking code (JDBC, RestClient) stays as is.
  • Measure with a load test before and after; do not assume.
  • ThreadLocal still works but is costly with millions of threads; prefer explicit passing.
Draft outline details

Demonstration

yaml
spring:
  threads:
    virtual:
      enabled: true

Check your understanding

What changes in your controller code?

Show answer

Nothing; the same blocking code runs on virtual threads.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.