-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document @Order
behavior on types, bean methods, and config classes
#30177
Comments
Which classes were you annotating? The |
When |
I think @cloudshiftchris is right,
Additionally, this annotation is supported on I think we can document this behavior a bit better, especially in the reference documentation. I would not emphasize this feature, as absolute ordering is hard to maintain for such cases and all the other means ( |
@cloudshiftchris @bclozel In my manual tests, annotating @configuration classes with @order did not alter the instantiation order of them or its bean-exposing methods, nor the order of injection of those beans when fetched as a list, but Ill repeat the test, since the version I played with is now half-year old |
@nightswimmings you wouldn't be able to readily discern the effects of
When For Spring Security filters the correct method to order them is |
@Order
behavior on types, bean methods, and config classes
Using latest Spring-Boot 3.x, I experimented a bit with @order in the context of Spring-Security on multiple @SecurityFilterChains.
I created 2 @configuration SecurityConfigs, each one with 2 @bean SecurityFilterChain, and later on I debugged the
to double-check the injection order.
So I am wondering, what is the point of @order at class level?
Thanks a lot!
The text was updated successfully, but these errors were encountered: