java - Spring bean loading order -


i've 2 bean definitions in application-context.xml (beanclassa, beanclassb). if beanclassa has @autowired annotation beanclassb, should beanclassb declared before beanclassa in bean definitions in application-context.xml? more generically there inherent order in beans loaded..

no. unless have complex circular dependencies, spring able publish injections before making beans available you. order of declarations in xml not important.


Comments