-
I am not sure if this is related to #9606: I am upgrading my application from micronaut 3 to 4 and facing a problem related to ServerRequestContext:
...
... } With micronaut 3, we are getting this.activeRequest object return from ServerRequestContext.currentRequest() call. However, with micronaut 4, I don't know how to make that happen. Simply change the setup to Can you suggest a solution? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Have you tried adding the io.micronaut:context-propagation dependency? https://docs.micronaut.io/4.3.12/guide/#reactorContextPropagation Do yo have a sample app which reproduces the issue? |
Beta Was this translation helpful? Give feedback.
You can do
PropagatedContext.getOrEmpty().plus(new ServerHttpRequestContext(request)).propagate()
and call close to cleanup. This might change in the next major version.