商品管理的Action类
模型驱动使用的类
Struts和Spring整合过程中按名称自动注入的业务层类
ssh整合篇-Struts和Spring整合过程中web层注入业务层的方法
编写Action、Service、DAO---在相应的包下创建类
(1)service需要注入dao,提供相应的set的方法;在spring中,只需要有set方法,即可完成注入操作
(2)action需要注入service两种方法
a. WebApplicationContextwap = ........
b. 引入 struts2-spring-plugin.jar后 可直接用 定义 private ProductService productservice 按名称来自动注入
(3)Action需继承ActionSupport并连接模型驱动接口,编写模型驱动;
ssh