Three verified programs (JDK 25, Spring Security 7.1.1, Spring Boot 4.1.1 dependency versions) backing the ankurm.com post: InheritableThreadLocal across thread models, @Async on a virtual-thread SimpleAsyncTaskExecutor (DelegatingSecurityContextExecutor vs ContextPropagatingTaskDecorator), and StructuredTaskScope.fork() propagation. Captured console output and docs chapters included.
6 lines
244 B
Plaintext
6 lines
244 B
Plaintext
=== Demo 1: InheritableThreadLocal across thread models ===
|
|
fresh platform thread sees: request-A
|
|
pool thread, task 1, sees: request-B
|
|
pool thread, task 2 (reused), sees: request-B <-- stale, not request-C
|
|
fresh virtual thread sees: request-D
|