setContextHolderStrategy static method
Replaces the strategy for the whole program.
Call it once at startup, before any context is stored: contexts kept by the old strategy are not carried over, and nothing checks this.
Implementation
// Spring's method, public API next to getContextHolderStrategy().
// ignore: use_setters_to_change_properties
static void setContextHolderStrategy(
SecurityContextHolderStrategy strategy,
) => _strategy = strategy;