java - How spring framework manage cyclic dependency -


i relatively new using spring framework. have read below advantages of using spring :

...containers provide support instantiation of managed objects, cyclical dependencies, life cycles management, , dependency resolution between managed objects etc....

how spring achieve ?

look @ dependency resolution process section in spring framework reference (search "circular dependencies" note @ sidebar).

basically, need use setter-based injection instead of constructor-based one. otherwise, you'll exception when container creates beans (if you're not using lazy initialization).


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -