My model layer is being used by a handful of different projects and I’d like to use a single XML Spring Configuration file for the model regardless of which project is using it.
My question is: Since not all beans are used in all projects am I wasting resources to any significant amount if there not being instantiated? I’m not too sure how lazy Spring is about loading them since it’s never been an issue until now.
Any ideas?
Taken from the Spring Reference Manual:
But, unless your beans are using up resources like file locks or database connections, I wouldn’t worry too much about simple memory overhead if it is easier for you to have this one configuration for multiple (but different) profiles.