资源简介

该演示系统应用了SpringMVC、JQuery、Hibernate-Validator、Interceptor、Object Converter、DIV+CSS3、JSON、Interceptor等主流技术,另外借助了Map、List、文本文件等数据存储器。

资源截图

代码片段和文件信息

package com.aoyy.converter;

import java.sql.Date;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;
import com.aoyy.model.Department;
import com.aoyy.model.Employee;
/**
 * Converte String to Employee
 * @author author
 * ==================== */
@Component
public class StringToEmployeeConverter implements Converter {
  /**
   * employeeId;employeeName;employeeGender;employeeBirthday;employeeEmail;employeeTelephone;employeeSalary;departmentId
   * 100001;E-100001;1;1991-01-01;E-100001@qq.com;13988886380;1000.0;1001
   * ======================================================================== */ 
  @Override
  public Employee convert(String input) {
if (input != null) {
  String[] splits = input.trim().split(“;“);
  if (splits.length == 8) {
Integer employeeId = (splits[0] != null ) ? Integer.valueOf(splits[0]) : null;
String employeeName = splits[1];
Integer employeeGender = (splits[2] != null) ? Integer.valueOf(splits[2]) : null;
Date employeeBirthday = (splits[3] != null) ? Date.valueOf(splits[3]) : null; 
String employeeEmail = splits[4];
String employeeTelephone = splits[5];
Float employeeSalary = (splits[6] != null) ? Float.valueOf(splits[6]) : null;
Integer departmentId = (splits[7] != null) ? Integer.valueOf(splits[7]) : null;
Department department = new Department();
department.setDepartmentId(departmentId);
Employee employee = new Employee(employeeId employeeName employeeGender employeeBirthday employeeEmail employeeTelephone employeeSalary department);
System.out.println(“converter: “+ employee);
return employee;
  }
}
return null;
  }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-06-13 10:37  EmployeeManager\
     目录           0  2017-06-13 10:37  EmployeeManager\CSS\
     文件         857  2017-06-11 19:01  EmployeeManager\CSS\addEmployee.css
     文件        2194  2017-06-13 10:28  EmployeeManager\CSS\employeeList.css
     文件         871  2017-06-13 09:54  EmployeeManager\CSS\updateEmployee.css
     文件         331  2017-06-12 12:33  EmployeeManager\index.jsp
     目录           0  2017-06-13 10:37  EmployeeManager\JS\
     文件        1068  2017-06-13 09:14  EmployeeManager\JS\employeeList.js
     文件       57254  2017-06-13 10:06  EmployeeManager\JS\jquery-1.3.2.min.js
     文件         656  2017-06-13 09:14  EmployeeManager\JS\updateEmployee.js
     目录           0  2017-06-13 10:37  EmployeeManager\meta-INF\
     文件          39  2017-06-06 00:38  EmployeeManager\meta-INF\MANIFEST.MF
     目录           0  2017-06-13 10:37  EmployeeManager\WEB-INF\
     目录           0  2017-06-13 10:37  EmployeeManager\WEB-INF\classes\
     文件        2663  2017-06-13 09:12  EmployeeManager\WEB-INF\classes\applicationContext.xml
     目录           0  2017-06-13 10:37  EmployeeManager\WEB-INF\classes\com\
     目录           0  2017-06-13 10:37  EmployeeManager\WEB-INF\classes\com\aoyy\
     目录           0  2017-06-13 10:37  EmployeeManager\WEB-INF\classes\com\aoyy\converter\
     文件        2570  2017-06-13 09:59  EmployeeManager\WEB-INF\classes\com\aoyy\converter\StringToEmployeeConverter.class
     文件        1757  2017-06-13 08:49  EmployeeManager\WEB-INF\classes\com\aoyy\converter\StringToEmployeeConverter.java
     目录           0  2017-06-13 10:37  EmployeeManager\WEB-INF\classes\com\aoyy\dao\
     文件         328  2017-06-13 09:59  EmployeeManager\WEB-INF\classes\com\aoyy\dao\DepartmentDao.class
     文件         319  2017-06-13 08:56  EmployeeManager\WEB-INF\classes\com\aoyy\dao\DepartmentDao.java
     文件        4272  2017-06-13 09:59  EmployeeManager\WEB-INF\classes\com\aoyy\dao\DepartmentDaoImpl.class
     文件        3555  2017-06-13 01:53  EmployeeManager\WEB-INF\classes\com\aoyy\dao\DepartmentDaoImpl.java
     文件         482  2017-06-13 09:59  EmployeeManager\WEB-INF\classes\com\aoyy\dao\EmployeeDao.class
     文件         460  2017-06-13 09:00  EmployeeManager\WEB-INF\classes\com\aoyy\dao\EmployeeDao.java
     文件        8312  2017-06-13 09:59  EmployeeManager\WEB-INF\classes\com\aoyy\dao\EmployeeDaoImpl.class
     文件       10408  2017-06-13 09:04  EmployeeManager\WEB-INF\classes\com\aoyy\dao\EmployeeDaoImpl.java
     文件        1863  2017-06-13 09:59  EmployeeManager\WEB-INF\classes\com\aoyy\dao\GlobalVariables.class
     文件        1162  2017-06-13 01:46  EmployeeManager\WEB-INF\classes\com\aoyy\dao\GlobalVariables.java
............此处省略45个文件信息

评论

共有 条评论