struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Lenart <>
Subject Re: overriding framework components
Date Thu, 04 Oct 2012 19:08:33 GMT
2012/10/4 Davis, Chad <>:
> And, since I think I saw your name on some comments in the TextProvider, I wonder what
constructors get invoked when the TextProvider is injected in the TextProviderFactory on ActionSupport.
 The default TextProviderSupport has references to locale provider and a class, which can
be set via a constructor.  But I suspect the DI must only use the parameterless constructor.
 Is this true?  In what cases do those other constructors get invoked?

Yeah, it was my first bigger addition to Struts 2 ;-) It isn't an
optimal one ;-)

Anyway, you're right. DI will use the default constructor, the others
are used in other places (TextProviderFactory and ) - that's why it
isn't an optimal solution. DI supports also constructor injections, in
the same way as property injection, just add @Inject to constructor.

mobile +48 606 323 122
Warszawa JUG conference - Confitura

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message