WW-2765 add setting for autowire=no

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@735096 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Musachy Barroso
2009-01-16 19:37:42 +00:00
parent c6f015cd2c
commit b8971321eb
@@ -21,18 +21,16 @@
package org.apache.struts2.spring;
import javax.servlet.ServletContext;
import org.apache.struts2.StrutsConstants;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import org.springframework.web.context.WebApplicationContext;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.spring.SpringObjectFactory;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.StrutsConstants;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.WebApplicationContext;
import javax.servlet.ServletContext;
@@ -98,6 +96,8 @@ public class StrutsSpringObjectFactory extends SpringObjectFactory {
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);