-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Add public method to get bean order #34712
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
Comments
Ordering is semantically rather involved, not only in terms of potential order value sources, but also considering So while we could add a What's the use case in Boot to independently introspect the order value? |
Thanks for taking a look, @jhoeller. In
This won't be a problem in this case, as we have both the bean name and the instance. |
Ah, so you are trying to carry the order over from a target bean to the current bean, locally exposing it through your own |
Yes, correct. |
Hello,
in Boot we have the use-case to get the order of a bean. We have the bean instance, and also the bean name.
We tried:
but this only looks at the bean itself, not the factory method.
Combined with this:
it also supports
@Order
on the bean method, but it's missing@Priority
(is that supported on bean methods?) and, looking atorg.springframework.beans.factory.support.DefaultListableBeanFactory.FactoryAwareOrderSourceProvider
there's also aORDER
attribute on the bean definition.There's also
org.springframework.core.annotation.OrderUtils
but this only looks at annotations, not atimplements Ordered
.Would it be possible to provide a way to reliably get the order of the bean?
The text was updated successfully, but these errors were encountered: