Skip to content

WebFilter ordering in WebHttpHandlerBuilder only works on instances [SPR-15074] #19640

@spring-projects-issues

Description

@spring-projects-issues

Stéphane Nicoll opened SPR-15074 and commented

in WebHttpHandlerBuilder, WebFilter instances are ordered using AnnotationAwareOrderComparator. That will only work if the ordering is set on the class itself.

The following will be ignored

@Configuration
public class MyConfig {
  
   @Bean @Order(42)
   public WebFilter myFilter() { ... }

}

There is an ignored test in the spring-boot-web-reactive project that reproduces this behaviour


Affects: 5.0 M4

Issue Links:

Referenced from: commits b609f3a

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions