一、pom.xml
<dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-spring-plugin</artifactId> <version>2.3.15.3</version> </dependency>
二、struts.xml
<!-- struts.xml 使用spring工厂 --> <constant name="struts.objectFactory" value="spring" />
org.apache.struts2.spring.StrutsSpringObjectFactory
action 应该托管给spring