struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: How to get instance of the given dependency using Container
Date Mon, 01 Oct 2012 12:39:32 GMT
2012/10/1 Aum Strut <aum.struts@gmail.com>:
> i was thinking about a way like Spring DI used to do something like
>
> <bean type="com.foo.MyInterface" class="com.foo.MyImpl1" name="impl1" >
>    <property name="a" value="Run time class"/>
> </bean>
>
> It would be more convient to have injection like this way.

Just annotate your setter with @Inject(name="a") and create constant
in struts.xml. If "a" is a String value.


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message