• 大小: 3.97MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-20
  • 语言: 其他
  • 标签: SSH框架  

资源简介

Struts2、Hibernate、spring三个框架组合开发的员工信息管理系统

资源截图

代码片段和文件信息

package com.action;

import java.util.List;

import com.entity.Department;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.service.DepartmentService;

public class DepartmentAction extends ActionSupport implements ModelDriven {
     /**
 * 
 */
private static final long serialVersionUID = 1L;

private Department department=new Department();
@Override
public Department getModel() {

return department;
}

    //注入DepartmentService 对象
private DepartmentService departmentService;
public void setDepartmentService(DepartmentService departmentService) {
this.departmentService = departmentService;
}

//创建list对象
@SuppressWarnings(“rawtypes“)
private List list;
@SuppressWarnings(“rawtypes“)
public List getList() {
return list;
}

@SuppressWarnings(“rawtypes“)
public void setList(List list) {
this.list = list;
}

//创建分页查询属性
    private int page = 1;
    private int pageSize;
    private int totalPage;
    private int rows;
    
public int getPage() {
return page;
}

public void setPage(int page) {
this.page = page;
}

public int getPageSize() {
return pageSize;
}

public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}

public int getTotalPage() {
return totalPage;
}

public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getRows() {
return rows;
}

public void setRows(int rows) {
this.rows = rows;
}


    public String findAll(){
     list=departmentService.findByPage(page pageSize);
     totalPage=departmentService.findTotalPage(pageSize);
     rows=departmentService.findRows();
     return SUCCESS;
    }

    public String save(){
     departmentService.save(department);
     return SUCCESS;
    }

    public String findById(){
     department=departmentService.findById(department.getDid()); 
     return SUCCESS;
    }
    public String updateDep(){
     departmentService.update(department);
     return SUCCESS;
    }
    public String delDep(){
     department=departmentService.findById(department.getDid());
     departmentService.del(department);
     return SUCCESS;
    }




}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-03-15 08:47  SSH_employe\
     文件        2040  2018-01-03 00:48  SSH_employe\.classpath
     文件         373  2017-12-24 11:21  SSH_employe\.myhibernatedata
     文件        1269  2017-12-24 11:21  SSH_employe\.project
     目录           0  2018-03-03 13:44  SSH_employe\.settings\
     文件         564  2017-12-24 11:20  SSH_employe\.settings\.jsdtscope
     文件         108  2017-12-24 11:21  SSH_employe\.settings\com.genuitec.runtime.libraries.xml
     文件         364  2017-12-24 11:20  SSH_employe\.settings\org.eclipse.jdt.core.prefs
     文件         492  2017-12-24 11:20  SSH_employe\.settings\org.eclipse.wst.common.component
     文件         617  2017-12-24 11:21  SSH_employe\.settings\org.eclipse.wst.common.project.facet.core.prefs.xml
     文件         563  2017-12-24 11:21  SSH_employe\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-12-24 11:20  SSH_employe\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-12-24 11:20  SSH_employe\.settings\org.eclipse.wst.jsdt.ui.superType.name
     文件         458  2017-12-24 11:21  SSH_employe\.springBeans
     目录           0  2018-03-03 13:44  SSH_employe\src\
     文件        3191  2018-01-03 22:59  SSH_employe\src\applicationContext.xml
     目录           0  2018-03-03 13:44  SSH_employe\src\com\
     目录           0  2018-03-03 13:44  SSH_employe\src\com\action\
     文件        2339  2018-01-09 19:28  SSH_employe\src\com\action\DepartmentAction.java
     文件        2956  2018-01-09 19:28  SSH_employe\src\com\action\EmployeeAction.java
     目录           0  2018-03-03 13:44  SSH_employe\src\com\dao\
     文件        2316  2018-01-09 19:29  SSH_employe\src\com\dao\DepartmentDao.java
     文件        2465  2018-01-09 19:29  SSH_employe\src\com\dao\EmployeeDao.java
     目录           0  2018-03-03 13:44  SSH_employe\src\com\entity\
     文件         972  2017-12-24 12:37  SSH_employe\src\com\entity\Department.hbm.xml
     文件         767  2018-02-27 16:02  SSH_employe\src\com\entity\Department.java
     文件        1463  2018-01-03 01:04  SSH_employe\src\com\entity\Employee.hbm.xml
     文件        1379  2017-12-24 12:25  SSH_employe\src\com\entity\Employee.java
     目录           0  2018-03-03 13:44  SSH_employe\src\com\service\
     文件        1196  2018-01-09 19:29  SSH_employe\src\com\service\DepartmentService.java
     文件        1235  2018-01-04 13:24  SSH_employe\src\com\service\EmployeeService.java
............此处省略185个文件信息

评论

共有 条评论