|
From: Matt S. <mat...@sp...> - 2006-07-21 13:39:18
|
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). > > |