|
From: Bob W. <bw...@po...> - 2006-07-21 20:48:25
|
No, you define it at the root level and it applies to any bean which doesn't specifically specify lazy init: <beans default-lazy-init='true'> Bob Eduardo Pereda IV wrote: > But you have to set that in every bean file, am I right? Is there a > way to globaly define it, for example by setting a property? > I would like something like --Dorg.springframework.default-lazy-init=true > > Thanks! > > > On 7/21/06, *Matt Sgarlata* <mat...@sp... > <mailto:mat...@sp...>> wrote: > > default-lazy-init="true" > > There's your solution :) > > Matt > > epere4 wrote: > > > > Juergen Hoeller wrote: > >> Lazy initialization on a bean-by-bean basis can for example be > used for > >> switching between alternatives based on some placeholder in a bean > >> reference. That said, I generally agree that lazy loading is > not used that > >> much in a Spring environment, in particular not in production. > And even in > >> development, the startup time of an application context usually > doesn't > >> really matter... at least not the Spring side of it. > >> > >> Juergen > >> > > > > Hello! > > > > I disagree, here. It is true that spring's part in startup time > will be > > small, but if the beans you instantiate are a lot or are somehow > complex, > > then you end up waiting for a while until your app completes its > starting. > > > > I would like to have some way to make spring lazy instantiate > *everything* > > by default (at least at development time). The app in the > project I am > > waiting for has a huge bean's tree and it takes around half a > minute to load > > them all (and when I am developing, I rarely need to use more > than a few of > > these beans at a time). > > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys -- and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > <mailto:Spr...@li...> > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |