From 8fb65ca0ff9ec527b9e8fb2d1c6beb3301dff81f Mon Sep 17 00:00:00 2001 From: Sriram Kasthuri Date: Thu, 18 Apr 2024 16:53:00 +0100 Subject: [PATCH] LCAM-1314: Enabled context propagation to automatically wrap reactor internal mechanisms to propagate context between operators, threads etc. on application startup. --- crime-evidence/build.gradle | 4 ++-- .../justice/laa/crime/evidence/CrimeEvidenceApplication.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crime-evidence/build.gradle b/crime-evidence/build.gradle index 9d8d126..9c82fd5 100644 --- a/crime-evidence/build.gradle +++ b/crime-evidence/build.gradle @@ -16,8 +16,8 @@ jacoco { def versions = [ pitest : "1.16.0", - crimeCommonsClasses : "3.2.0", - commonsRestClient : "3.2.0", + crimeCommonsClasses : "3.4.0", + commonsRestClient : "3.4.0", wmStubRunnerVersion : "4.1.2", springDocWebMVCVersion: "2.5.0", postgresqlVersion : "42.7.2" diff --git a/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/CrimeEvidenceApplication.java b/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/CrimeEvidenceApplication.java index 54dbbb3..392d6bc 100644 --- a/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/CrimeEvidenceApplication.java +++ b/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/CrimeEvidenceApplication.java @@ -5,6 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.EnableAspectJAutoProxy; +import reactor.core.publisher.Hooks; @Slf4j @SpringBootApplication @@ -12,6 +13,7 @@ @EnableAspectJAutoProxy(proxyTargetClass = true) public class CrimeEvidenceApplication { public static void main(String[] args) { + Hooks.enableAutomaticContextPropagation(); SpringApplication.run(CrimeEvidenceApplication.class, args); } }