• 大小: 14.47MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-19
  • 语言: 数据库
  • 标签: ssm  easyUI  

资源简介

后端采用SSM框架,前端采用EasyUI框架,功能完善,包含数据库文件,导入即可使用 MySQL56+Tomcat8+Myeclipse2017+Spring4.1,良心之作,所以收两分,如有不明白可以加QQ 1032089468进行咨询

资源截图

代码片段和文件信息

package com.ssm.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.sound.midi.SysexMessage;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ssm.pojo.Student;
import com.ssm.service.StudentService;
import com.ssm.util.AutoCreateSno;

@Controller
@RequestMapping(“/student“)
public class StudentAction {

//private final Logger logger = LoggerFactory.getLogger(this.getClass()); 

@Autowired
private StudentService studentService;

@RequestMapping(value=“/list“method=RequestMethod.GET)
public String list(Model model)
{
//List list = studentService.findAll();
//model.addAttribute(“list“list);
//logger.info(““ );
//list.jsp+model = ModelAndView
System.out.println(“跳转到首页“);
return “list“;    //WEB-INF/jsp/list.jsp
}

@RequestMapping(value=“/{sid}/detail“method=RequestMethod.GET)
public String detail(@PathVariable(“sid“) int sidModel model)
{

if(sid==0)
{
return “redirect:/student/list“;//重定向
}
Student student = studentService.findById(sid);

if(student == null)
{
return “forward:/student/list“;//转发
}
model.addAttribute(“student“ student);
return “detail“;
}

/**
 *
     *@RequestMapping(value=“/{sid}/detail“
     *                method=RequestMethod.POST
     *                produces = {application/json;charset=utf-8})
     *                @ResponseBody
 *                public StudentResult query(){};
 */

@RequestMapping(value = “/getDataToJson“method=RequestMethod.GET)
@ResponseBody
public List getDataToJson() throws Exception{

List list = studentService.findAll();
System.out.println(list);
return list == null ? new ArrayList() : list;
}

@RequestMapping(value = “/insertStudent“method=RequestMethod.POST)
@ResponseBody
//String snameint sexint sageString sbirthdayString saddrString sgradtime
//@RequestParam String sname@RequestParam int ssex@RequestParam int sage@RequestParam String sbirthday@RequestParam String saddr@RequestParam String sgradtime
public Map insertStudent(Student student)
{
//student.setSno(“1111“);
Map map = new HashMap();
try
{
studentService.save(student);
map.put(“key“ “success“);
}
catch(Exception e)
{
map.put(“key“ “failure“);
throw new RuntimeException(“新增学生运行时异常“e);
}
return map

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-04-22 17:12  ssm\
     文件        1138  2017-04-20 00:30  ssm\.classpath
     文件        1394  2017-04-20 00:30  ssm\.project
     目录           0  2017-04-22 17:12  ssm\.settings\
     文件         522  2017-04-18 20:25  ssm\.settings\.jsdtscope
     文件          94  2017-04-21 14:35  ssm\.settings\com.genuitec.eclipse.core.prefs
     文件          79  2017-04-20 00:30  ssm\.settings\com.genuitec.eclipse.migration.prefs
     文件         364  2017-04-18 20:25  ssm\.settings\org.eclipse.jdt.core.prefs
     文件         545  2017-04-18 20:28  ssm\.settings\org.eclipse.wst.common.component
     文件         172  2017-04-20 00:30  ssm\.settings\org.eclipse.wst.common.project.facet.core.prefs.xml
     文件         462  2017-04-20 00:30  ssm\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-04-18 20:25  ssm\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-04-18 20:25  ssm\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-04-22 17:12  ssm\config\
     文件         121  2017-04-18 20:31  ssm\config\db.properties
     文件         358  2017-04-16 17:53  ssm\config\log4j.properties
     文件         482  2017-04-19 12:09  ssm\config\logback.xml
     文件         587  2017-04-19 01:22  ssm\config\mybatis-config.xml
     文件        2047  2017-04-20 08:48  ssm\config\spring-dao.xml
     文件        1319  2017-04-20 09:18  ssm\config\spring-service.xml
     文件        2124  2017-04-20 14:25  ssm\config\spring-web.xml
     文件         699  2017-04-22 16:42  ssm\config\student.sql
     目录           0  2017-04-22 17:12  ssm\src\
     目录           0  2017-04-22 17:12  ssm\src\com\
     目录           0  2017-04-22 17:12  ssm\src\com\ssm\
     目录           0  2017-04-22 17:12  ssm\src\com\ssm\action\
     文件        5094  2017-04-22 16:42  ssm\src\com\ssm\action\StudentAction.java
     目录           0  2017-04-22 17:12  ssm\src\com\ssm\dao\
     目录           0  2017-04-22 17:12  ssm\src\com\ssm\dao\impl\
     文件        2518  2017-04-22 16:34  ssm\src\com\ssm\dao\impl\StudentMapper.xml
     文件        1255  2017-04-22 16:31  ssm\src\com\ssm\dao\StudentDao.java
............此处省略487个文件信息

评论

共有 条评论