Suppose I'm injecting list of some beans:
@Autowired
List<SomeBean> beans;
What is default injection order in this situation?
I know about Ordered
interface and @Order
annotation, I'm asking only about default behavior.
What I've noticed is that in case of manual bean registration:
context.register(SomeBeanA.class);
context.register(SomeBeanB.class);
context.register(SomeBeanC.class);
This beans is injected in the exact same order as I registered them: 1 element in list is SomeBeanA, 2 — SomeBeanB, 3 — SomeBeanC.
Is there is any guarantee of this behavior? I mean can I be sure that it won't change in further release?
Thanks.