With platform threads, a method annotated with @Scheduled keeps an empty Spring Boot application running. When virtual threads are enabled, this is no longer the case and the application stops once it has initialized.
To fix the JVM issue we need to enable the spring.main.keep-alive=true when enable the Virtual threads with the spring boot application.
Watch video Spring Boot Virtual threads kills the JVM | spring.main.keep-alive=true | Java Virtual Threads online without registration, duration hours minute second in high quality. This video was added by user KOBS Technologies 30 November 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 23 once and liked it people.