Skip to content

@Order attribute on @GrpcGlobalInterceptor ignored when created by @Bean inside a @Configuration #117

@seime

Description

@seime

The @Order annotation is not detected when used inside a @Configuration and hence the order is undefined (on my JRE the interceptor defined by the last factory method is executed first)

Example:

@Configuration
 public class MyConfig{
     @Bean
     @Order(1) // Ignored
     @GRpcGlobalInterceptor
     public  ServerInterceptor first(){
         return new ServerInterceptor(){ ..} // Executed last
     }

     @Bean
     @Order(2) // Ignored
     @GRpcGlobalInterceptor
     public  ServerInterceptor last(){ 
         return new ServerInterceptor(){ ..} // Executed first
     }
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions