• 大小: 21.32MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-07
  • 语言: 其他
  • 标签:

资源简介

EasyUi框架,增删改查例子(保证完整)。直接导入eclipse即可。保证最新。

资源截图

代码片段和文件信息

package sy.controller;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import sy.pageModel.Bug;
import sy.pageModel.DataGrid;
import sy.pageModel.Json;
import sy.service.BugServiceI;
import sy.util.ExceptionUtil;
import sy.util.ResourceUtil;

import com.alibaba.fastjson.JSON;

@Controller
@RequestMapping(“/bugController“)
public class BugController {

private BugServiceI bugService;

public BugServiceI getBugService() {
return bugService;
}

@Autowired
public void setBugService(BugServiceI bugService) {
this.bugService = bugService;
}

@InitBinder
public void initBinder(ServletRequestDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss“);
binder.registerCustomEditor(Date.class new CustomDateEditor(dateFormat true));
}

@RequestMapping(“/datagrid“)
@ResponseBody
public DataGrid datagrid(Bug bug) {
return bugService.datagrid(bug);
}

@RequestMapping(“/add“)
@ResponseBody
public Json add(Bug bug) {
Json j = new Json();
try {
Bug r = bugService.save(bug);
j.setSuccess(true);
j.setMsg(“添加成功!“);
j.setObj(r);
} catch (Exception e) {
j.setMsg(e.getMessage());
}
return j;
}

@RequestMapping(“/remove“)
@ResponseBody
public Json remove(Bug bug) {
bugService.remove(bug.getIds());
Json j = new Json();
j.setSuccess(true);
j.setMsg(“删除成功!“);
return j;
}

@RequestMapping(“/bugglEdit“)
public String bugglEdit(String id HttpServletRequest request) {
Bug b = bugService.getBug(id);
request.setAttribute(“bug“ b);
return “admin/bugglEdit“;
}

@RequestMapping(“/edit“)
@ResponseBody
public Json edit(Bug bug) {
Json j = new Json();
try {
Bug r = bugService.edit(bug);
j.setSuccess(true);
j.setMsg(“编辑成功!“);
j.setObj(r);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-12-05 09:15  EasyUi框架例子\
     文件         637  2012-12-05 09:20  EasyUi框架例子\.classpath
     文件        1038  2012-11-22 08:32  EasyUi框架例子\.project
     目录           0  2012-12-05 09:17  EasyUi框架例子\.settings\
     文件         503  2012-11-22 08:32  EasyUi框架例子\.settings\.jsdtscope
     文件          57  2012-11-22 08:32  EasyUi框架例子\.settings\org.eclipse.core.resources.prefs
     文件         364  2012-11-22 08:32  EasyUi框架例子\.settings\org.eclipse.jdt.core.prefs
     文件         549  2012-11-22 08:33  EasyUi框架例子\.settings\org.eclipse.wst.common.component
     文件         345  2012-11-22 08:32  EasyUi框架例子\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2012-11-22 08:32  EasyUi框架例子\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2012-11-22 08:32  EasyUi框架例子\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2012-12-05 09:17  EasyUi框架例子\build\
     目录           0  2012-12-05 09:17  EasyUi框架例子\resources\
     文件        1071  2012-12-05 09:21  EasyUi框架例子\resources\config.properties
     文件         528  2012-11-22 08:41  EasyUi框架例子\resources\log4j.properties
     文件        5766  2012-11-22 08:41  EasyUi框架例子\resources\spring-hibernate.xml
     文件        4134  2012-11-22 08:41  EasyUi框架例子\resources\spring-mvc.xml
     文件         703  2012-11-22 08:41  EasyUi框架例子\resources\spring.xml
     目录           0  2012-12-05 09:17  EasyUi框架例子\src\
     目录           0  2012-12-05 09:17  EasyUi框架例子\src\sy\
     目录           0  2012-12-05 09:17  EasyUi框架例子\src\sy\controller\
     文件        9741  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\BugController.java
     文件         330  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\DruidController.java
     文件         390  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\FileController.java
     文件        1569  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\MenuController.java
     文件         833  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\OnlineController.java
     文件         834  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\RepairController.java
     文件        1677  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\ResourceController.java
     文件        1770  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\RoleController.java
     文件        4815  2012-11-22 08:42  EasyUi框架例子\src\sy\controller\UserController.java
     目录           0  2012-12-05 09:17  EasyUi框架例子\src\sy\dao\
............此处省略2480个文件信息

评论

共有 条评论

相关资源