Skip to content

Handler Interceptor Adapter in Spring WebFlux [SPR-17264] #21797

@spring-projects-issues

Description

@spring-projects-issues

jakubdyszkiewicz opened SPR-17264 and commented

My team is in the middle of migrating our Spring MVC extensions to WebFlux.

We've got a feature that lets our clients customize metric of controller method. To do that we've created our annotation that is processed by HandlerInterceptorAdapter.

What's more, our metrics convention is a controller method name, not a path.

The problem is that I can't see any equivalent of this in Spring WebFlux. I can't use WebFilter because Spring does not know yet which endpoint will be called, therefore I can't process annotation. How can I implement that?

The closest workaround I found is to use RequestMappingHandlerMapping and somehow build a map of Map<String(path), HandlerMethod>, but this is cumbersome in my opinion

Thanks


Issue Links:

0 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions