Thanks for your article. But I have a question How can I adapt the @Async annotation in Spring Boot to use virtual threads instead of traditional platform threads? PublixPassport
If you specify @Async(TaskExecutionAutoConfiguration.APPLICATION_TASK_EXECUTOR_BEAN_NAME) at the method level of your spring bean, it will automatically work as a Virtual Thread. I've added that to the article :)
Hey, thanks for the report. I am just wondering why you need all these --enable-preview declarations for jdk 21 since you mentioned that this is already enabled by default in the LTS?
Good point. JDK 21 wasn't out at the time of the original post, which is why there was a vestige of it in the example. As you say, the --enable-preview option is not needed in JDK 21. I've fixed the example as well. Thanks for the feedback :)
Jamie Cordeiro
Thanks for your article. But I have a question How can I adapt the @Async annotation in Spring Boot to use virtual threads instead of traditional platform threads? PublixPassport