我在 Spring Reactive 应用程序中工作。我知道如何使用 HttpServletRequest 在拦截器中获取 PathVariable,有些类似:
request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
Run Code Online (Sandbox Code Playgroud)
但我们必须进行一些更改,现在我们有了 WebFilter 实现,因此我们不使用 HttpServletRequest,而是使用 ServerWebExchange
如何从 ServerWebExchange 获取 Pathvariable?这是可能的?