I can't remember for sure but there are few flags in the spring plugin
to configure autowiring.

musachy

On Mon, Aug 24, 2009 at 2:36 AM, Obinna<obi...@gmail.com> wrote:
> I'm using struts with the spring object factory
>
> I'm trying to package some struts configuration such that I can define some
> commonly reused actions in a base struts configuration file and extend in
> multiple projects. This means that my struts configuration will be generic
> but my spring configuration (which I use to inject project-specific
> properties and other beans in to my action) will be project specific.
>
> In this base struts configuration, since I can't predict what the struts
> action beans will be named in the project-specific spring configuration
> file, I need to provide the full class name for each action. However, when
> used in a project (which extends this base struts configuration), I would
> like to be able to inject properties into this action from my spring
> configuration. In my spring configuration, I provide a bean entry for the
> struts action and inject some other bean references and some static
> properties. Using the default autowiring strategy, upon instantiation of the
> action (prototype scope), the spring object factory recognizes the spring
> configuration for the action and "autowires" it to inject ONLY THE OTHER
> BEAN REFERENCES. ANY STATIC PROPERTIES SET IN CONFIGURATION ARE IGNORED.
> Looking through the spring code, this is due to the standard implementation
> of the the autowireByName()  method being called in Spring's
> AbstractAutowireCapableBeanFactory class.
>
> My question: Is there currently some combination of spring wiring
> strategies/ struts configuration that will allow me to do what I want which
> is to define my struts action by Class name and yet manage it it fully
> (including static-property injection) from my spring configuration file? I
> suspect others will have run in to this same issue before.
>
> Thanks,
> - Eric
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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

Reply via email to