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 -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -