-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Bernard Macours opened SPR-3948 and commented
There should be a way to order bean initialization. Using "depends-on" is too verbose and is forcing us to explicitly bind business beans with technical beans:
<bean name="my-technical-bean"/>
<bean name="my-business-bean-1" depends-on="my-technical-bean"/>
<bean name="my-business-bean-2" depends-on="my-technical-bean"/>
It would be better to have something like:
<bean name="my-technical-bean" init-order="0"/>
<bean name="my-business-bean-1"/>
<bean name="my-business-bean-2"/>
Of course, we could configure several beans with a different initialization order. For example:
<bean name="my-technical-bean-a" init-order="0"/>
<bean name="my-technical-bean-b" init-order="1"/>
Note: "init-order" would be meaningless for lazy-initialized beans.
Affects: 2.0.6
4 votes, 5 watchers