资源简介

ssm框架整合,springMVC+mybatis做的简单学生信息管理系统,实现其增删改查功能,用的mysql数据库。

资源截图

代码片段和文件信息

package com.cd.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.cd.po.Student;
import com.cd.service.StudentService;

@Controller
public class StudentController {

@Autowired
private StudentService studentService;

@RequestMapping(“/listStudent“)
public ModelAndView listStudent(){
List list = this.studentService.getAll();
ModelAndView mv = new ModelAndView();
mv.addobject(“list“ list);
mv.setViewName(“/index.jsp“);
return mv;
}

@RequestMapping(“/studentAdd“)
public ModelAndView studentAdd(Student stu){
this.studentService.addStudent(stu);
return this.listStudent();
}

@RequestMapping(“/selectById“)
public ModelAndView selectStuById(int id){
List stu=this.studentService.selectStuById(id);
ModelAndView mv=new ModelAndView();
mv.addobject(“stu“ stu);
mv.setViewName(“/upd.jsp“);
return mv;
}

@RequestMapping(“/selectById2“)
public ModelAndView selectStuById2(int id){
List stu=this.studentService.selectStuById(id);
ModelAndView mv=new ModelAndView();
mv.addobject(“stu“ stu);
mv.setViewName(“/show.jsp“);
return mv;
}

@RequestMapping(“/studentDel“)
public ModelAndView studentDel(int id){
this.studentService.delStudent(id);
return this.listStudent();
}

@RequestMapping(“/studentUpd“)
public ModelAndView studentUpd(Student stu){
this.studentService.updStudent(stu);
return this.listStudent();
}

@RequestMapping(“/listByName“)
public ModelAndView listByName(@RequestParam(“name“)String firstName){
List stu = this.studentService.selectByFirstName(firstName);
ModelAndView mv = new ModelAndView();
mv.addobject(“stu“ stu);
mv.setViewName(“/show.jsp“);
return mv;
}
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-06-30 09:29  rjday7\
     文件        1093  2018-06-30 09:29  rjday7\.classpath
     文件        1331  2018-06-30 11:20  rjday7\.project
     目录           0  2018-06-30 13:15  rjday7\.settings\
     文件         522  2018-06-30 09:29  rjday7\.settings\.jsdtscope
     文件         131  2018-07-05 00:29  rjday7\.settings\org.eclipse.core.resources.prefs
     文件         364  2018-06-30 09:29  rjday7\.settings\org.eclipse.jdt.core.prefs
     文件         477  2018-06-30 09:29  rjday7\.settings\org.eclipse.wst.common.component
     文件         414  2018-06-30 09:29  rjday7\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-06-30 09:29  rjday7\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-06-30 09:29  rjday7\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-06-30 10:02  rjday7\src\
     文件        3549  2018-06-30 11:29  rjday7\src\applicationContext.xml
     目录           0  2018-06-30 10:02  rjday7\src\com\
     目录           0  2018-06-30 11:31  rjday7\src\com\cd\
     目录           0  2018-06-30 10:32  rjday7\src\com\cd\controller\
     文件        2067  2018-07-05 12:34  rjday7\src\com\cd\controller\StudentController.java
     目录           0  2018-06-30 10:03  rjday7\src\com\cd\mapper\
     文件         401  2018-07-05 11:23  rjday7\src\com\cd\mapper\StudentMapper.java
     文件        1037  2018-07-05 01:03  rjday7\src\com\cd\mapper\StudentMapper.xml
     目录           0  2018-06-30 10:19  rjday7\src\com\cd\po\
     文件         868  2018-06-30 11:58  rjday7\src\com\cd\po\Student.java
     目录           0  2018-06-30 10:33  rjday7\src\com\cd\service\
     文件         387  2018-07-05 11:01  rjday7\src\com\cd\service\StudentService.java
     文件         867  2018-07-05 11:24  rjday7\src\com\cd\service\StudentServiceImpl.java
     文件        1316  2018-06-30 10:23  rjday7\src\springmvc.xml
     文件         194  2018-06-30 10:23  rjday7\src\SqlMapConfig.xml
     目录           0  2018-07-05 00:28  rjday7\WebRoot\
     文件        1214  2018-07-03 13:01  rjday7\WebRoot\add.jsp
     文件        1362  2018-07-05 12:35  rjday7\WebRoot\index.jsp
     目录           0  2018-06-30 09:29  rjday7\WebRoot\meta-INF\
............此处省略53个文件信息

评论

共有 条评论