first:create DB table
second:create hbm.xml file and create po class
third:create DAO and DAOImpl
forth:create service and serviceImpl
fifth:create action
当一个action被调用后
以professor为例子
action:getAllProfessor
service和dao分别为:professorManager 和 professorDAO
调用getAllProfessor.action后
1)在getAllProfessor中一定要有professorManager属性,并且一定要有setProfessorManager()方法,将ProfessorManager对象进行初始化.
2)在ProfessorManagerImpl(ProfessorManager的实现)一定要有setProfessorDAO方法,对ProfessorManagerImpl中的ProfessorDAO进行初始化.
3)最后在ProfessorDAO中实现对数据库的访问操作
!!在次感谢下XCD~~~