We use MDC to add a request id to HTTP requests in our Spring Boot application using SLF4J.
We do this by adding a GenericFilterBean
that intercepts the request, converts to HTTTP, and writes the desired information to MDC.put(...);
What is the correct pattern for doing this on, for example, a QuartzJob that uses a CronTrigger to launch jobs? Or a Spring Batch job?