ssh2框架整合注意事项:
web.xml:
<context-param>
<param-name>contextConfigLocation</param-name>
<!-- 如果有多个配置文件那就用 ","分割就可以了 classpath: -->
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<!-- 初始化spring容器并监听 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
struts.xml:
<!-- 这句话作用将struts2交于spring托管 -->
<constant name="struts.objectFactory" value="spring"/>
web.xml:
<context-param>
<param-name>contextConfigLocation</param-name>
<!-- 如果有多个配置文件那就用 ","分割就可以了 classpath: -->
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<!-- 初始化spring容器并监听 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
struts.xml:
<!-- 这句话作用将struts2交于spring托管 -->
<constant name="struts.objectFactory" value="spring"/>