I wasn't sure, hence the question.
The factory has this:
int type = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME; // default
if ("name".equals(autoWire)) {
type = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME;
} else if ("type".equals(autoWire)) {
type = AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE;
} else if ("auto".equals(autoWire)) {
type = AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT;
} else if ("constructor".equals(autoWire)) {
type = AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR;
} else if ("no".equals(autoWire)) {
type = AutowireCapableBeanFactory.AUTOWIRE_NO;
}
this.setAutowireStrategy(type);
So setting it to "no" won't have any effect, I think.
OTOH, in 2.1.mumble "struts.objectFactory.spring.autoWire.alwaysRespect"
was introduced. It defaults to "false", but I haven't dug in to it to see
how it actually works, or in what sense "false" is used.
Ultimately I ask because a guy is setting autowire="no" in spring config,
using the S2 Spring plugin, and seeing autowiring messages on context
initialization.
Just wanted to see if there was any consensus before I started exploring :)
Dave
On Wed, Dec 7, 2011 at 5:55 PM, Wes Wannemacher <[email protected]> wrote:
> Can't you set struts.objectFactory.spring.autoWire to "no"?
>
> If you set that, what happens? In my apps, I don't *think* that beans
> are autowiring.
>
> -Wes
>
> On Wed, Dec 7, 2011 at 5:12 PM, Dave Newton <[email protected]> wrote:
> > As it stands, turning off autowiring in the Spring plugin isn't possible
> > (AFAICT).
> >
> > It's been brought up before, but I'm wondering what the current thoughts
> > are on allowing non-autowired beans.
> >
> > Dave
>
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>