如清晰度低,可转PC网页观看高清版本:
http://v.qq.com/x/page/z0566pji5vf.html
1:hello struts2和list列表展示
1:在spring的配置文件applicationContext.xml中开启扫描注解
<!-- 扫描action包 -->
<context:component-scan base-package="com.xdl.action"/>
2:增加扫描注解
@Controller //id=helloAction
@Scope("prototype")//取消单例模式,应用场景:高并发业务,是因为我们接受参数值是用的全局变量
3:将struts.xml的接口请求处理修改为调用Spring容器注入的beans组件