Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.11.2
-
None
Description
struts.objectFactory.spring.autoWire can be set to
name
type
auto
constructor
but internally Spring has 5 autowire settings (in AutowireCapableBeanFactory):
AUTOWIRE_NO
AUTOWIRE_BY_NAME
AUTOWIRE_BY_TYPE
AUTOWIRE_CONSTRUCTOR
AUTOWIRE_AUTODETECT
This is a request to add support for no autowiring to the Struts 2 Spring plugin.
— Reason for this feature request —
The struts-spring-plugin makes it so you don't have to manually configure your actions in spring xml files, but with Spring 2.5's new annotation support and classpath scanning, you don't have to manually configure any beans in spring xml files.
With this setup, it would be nice if the struts-spring-plugin did not attempt to autowire beans itself but instead asked Spring for the bean, and if it wasn't found, no autowiring would occur.
I would suggest a new setting of
struts.objectFactory.spring.autoWire = no
Enabling this new setting would also fix bug #WW-2479