Spring 2.5: How to "lazy-init" when using annotations?
- From: "Robert M." <not.an.email@xxxxxxxxxxxxxx>
- Date: Sat, 26 Apr 2008 20:26:45 +0100
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.
.
- Prev by Date: Re: OT: English. Was Re: Short-lived Objects - good or bad?
- Next by Date: Re: shoulf
- Previous by thread: WebGoo 4.0.0
- Next by thread: make $97.36 PER HOUR guarenteed.... easiest cash you'll ever make!
- Index(es):