这是我正在使用的 Spring Boot 版本。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
我启用了虚拟线程。
应用程序.属性
spring.threads.virtual.enabled=true
我注意到,当我向 RestController 发出请求时,日志中的 tomcat-handler-xx 不会重置。这是正常行为吗?我会用完虚拟线程吗?
Tomcat虚拟线程实现不使用线程池。根据文档虚拟线程实现使用新的虚拟线程来执行每个任务。