How to Access a Request-Scoped Bean in a Spring Exception Handler?
I need to log trace information using a Tracer
bean, which is request-scoped, in both my REST method and exception handler. The Tracer
bean is consumed in the REST method to log the trace information at the start of processing the request, and I want to use the same trace message in the exception handler when an exception occurs.