R
Robert M.
I'm switching to Spring 2.5 but I'm stuck at one issue. When using the
"old" XML bean configuration, you could specify the "lazy-init"
attribute for each <bean> tag. (If set to "false", the bean is
pre-initialized on startup, if "true", it is only created when it is
actually needed.)
My problem: How can I achieve this when I use @Component annotations to
define my beans?
So far, I have googled and read the Spring documentation without
success. In the 2.5.3 docs, section "3.3.4. Lazily-instantiated beans",
it reads
"When configuring beans via XML, this lazy loading is controlled by the
'lazy-init' attribute on the <bean/> element"
But in the following text, there is no mention of how to do it with
annotations.
"old" XML bean configuration, you could specify the "lazy-init"
attribute for each <bean> tag. (If set to "false", the bean is
pre-initialized on startup, if "true", it is only created when it is
actually needed.)
My problem: How can I achieve this when I use @Component annotations to
define my beans?
So far, I have googled and read the Spring documentation without
success. In the 2.5.3 docs, section "3.3.4. Lazily-instantiated beans",
it reads
"When configuring beans via XML, this lazy loading is controlled by the
'lazy-init' attribute on the <bean/> element"
But in the following text, there is no mention of how to do it with
annotations.