diff --git a/docs/modules/ROOT/pages/spring-cloud-circuitbreaker-resilience4j/specific-circuit-breaker-configuration.adoc b/docs/modules/ROOT/pages/spring-cloud-circuitbreaker-resilience4j/specific-circuit-breaker-configuration.adoc index aacb0ba..3c643cc 100644 --- a/docs/modules/ROOT/pages/spring-cloud-circuitbreaker-resilience4j/specific-circuit-breaker-configuration.adoc +++ b/docs/modules/ROOT/pages/spring-cloud-circuitbreaker-resilience4j/specific-circuit-breaker-configuration.adoc @@ -27,6 +27,16 @@ public Customizer slowCustomizer() { } ---- +If you need to propogate the security context to the Circuit Breaker you must configure the circuit breaker to use `DelegatingSecurityContextExecutorService`. + +[source,java] +---- +@Bean +public Customizer groupExecutorServiceCustomizer() { + return factory -> factory.configureGroupExecutorService(group -> new DelegatingSecurityContextExecutorService(Executors.newVirtualThreadPerTaskExecutor())); +} +---- + [[reactive-example]] == Reactive Example