@Order attribute on @GrpcGlobalInterceptor ignored when created by @Bean inside a @Configuration
See original GitHub issueThe @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
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:13
Top Results From Across the Web
Injecting ordered Beans into a Collection does not honour the ...
If I @Inject or pass these as a Collection<> they retain the order in which they were created, ignoring the @Order annotations. Is...
Read more >24. Externalized Configuration - Spring
Spring Boot uses a very particular PropertySource order that is designed to allow sensible overriding of values. Properties are considered in the following ......
Read more >Don't Use the @Profile Annotation in a Spring Boot App!
This configuration adds a bean of type MockService to the application context if the test profile is active, and a bean of type...
Read more >Spring Boot Starter Module for GRPC Framework - Morioh
@Configuration public class MyConfig{ @Bean @GRpcGlobalInterceptor public ... This gives you the ability to set up the desired order of built-in and your ......
Read more >The BeanDefinitionOverrideException in Spring Boot - Baeldung
It works by simply replacing the former bean in case of a name conflict. ... Let's create two different Spring configurations, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was dropped science
4.0.0
Spring Boot end of life was august 2019 - maybe it is time to drop support for it? https://spring.io/blog/2018/07/30/spring-boot-1-x-eol-aug-1st-2019