struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Varley <>
Subject Re: Struts 2 Spring Plugin Usage
Date Tue, 03 Nov 2009 12:49:07 GMT
> I use the convention plugin for Struts and I take advantage of the
> spring auto wiring (by name) to automagically inject my service layer.
> You can do the same for the rest. Check out the reference guide over at
> spring framework to do so. Weirdly I like having my DAO and Service
> classes in the appcontext xml file.. But then that is because I am
> weird...

Either I'm misunderstanding the responses or I'm not being clear (I'm
also using the convention plugin along with the Spring plugin.)

<bean id="securityManager" class=""
/> is sufficient to have the PasswordChecker injected everywhere any
action contains a getSecurityManager() method.

However if my PasswordChecker also has need of injection to access a
database (ie. PaswordChecker contains a getDaoManager() method then
simply having

<bean id="securityManager" class="" />
<bean id="daoManager" class=""/>

in the application.context.xml does not appear to be sufficient. My
action is injected with the PasswordChecker, but the PasswordChecker
is not injected with the DaoManager.


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

View raw message