Add public method to get bean order #34712
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Uh oh!
There was an error while loading. Please reload this page.
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: