91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

maven3.6, spring, spring mvc,mybatis,tomcat9,MySQL, ,環境要自己搭好,才能使用,參考,參考,參考,自主學習

資源截圖

代碼片段和文件信息

package?com.scce.controller;

import?java.util.Enumeration;
import?java.util.List;

import?javax.servlet.ServletContext;
import?javax.servlet.http.HttpSession;
import?javax.servlet.http.HttpSessionContext;

import?org.apache.ibatis.annotations.Param;
import?org.springframework.beans.factory.annotation.Autowired;
import?org.springframework.stereotype.Controller;
import?org.springframework.ui.Model;
import?org.springframework.web.bind.annotation.ModelAttribute;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.bind.annotation.RequestMethod;
import?org.springframework.web.bind.annotation.ResponseBody;

import?com.fasterxml.jackson.databind.JsonSerializable;
import?com.scce.entity.Student;
import?com.scce.service.IStudentService;

import?net.sf.json.JSONArray;

@Controller
@RequestMapping(“/Student“)
public?class?StudentController?{

private?IStudentService?studentService;

public?IStudentService?getStudentService()?{
return?studentService;
}

@Autowired
public?void?setStudentService(IStudentService?studentService)?{
this.studentService?=?studentService;
}

@RequestMapping(“/ShowStudent“)
public?String?showStudent(Model?model)?{
List?stus?=?null;//?studentService.loadStudent();
model.addAttribute(“stuList“?stus);
return?“showstudent.jsp“;
}

@RequestMapping(“/index“)
public?String?index()?{
return?“index.jsp“;
}

//?集成增刪改查操作
private?String?exe(object?o?String?type)?{
String?result?=?““;
try?{
if?(type.equals(“execute“))?{
Student?student?=?(Student)?o;
if?(student.getId()?==?null?||?student.getId().equals(““))?{
this.studentService.insertStudnet(student);
}?else?{
this.studentService.updataStudent(student);
}

}?else?if?(type.equals(“delete“))?{
Integer?id?=?(Integer)?o;
this.studentService.deleteStudent(id);
}
result?=?“{\“code\“:\“200\“\“msg\“:\“success\“}“;
}?catch?(Exception?e)?{
e.printStackTrace();
result?=?“{\“code\“:\“500\“\“msg\“:\““?+?e.getMessage()?+?“\“}“;
}
return?result;
}

@RequestMapping(value?=?“/execute“?method?=?RequestMethod.POST)
public?@ResponseBody?String?executeStudent(@ModelAttribute(value?=?“student“)?Student?student)?{
return?exe(student?“execute“);
}

@RequestMapping(value?=?“/delete“?method?=?RequestMethod.POST)
public?@ResponseBody?String?deleteStudent(@Param(value?=?“id“)?Integer?id)?{
return?exe(id?“delete“);
}

@RequestMapping(value?=?“/select“?method?=?RequestMethod.POST)
public?@ResponseBody?Student?selectStudent(@Param(value?=?“id“)?Integer?id)?{
return?this.studentService.selectByID(id);
}

//?@ResponseBody是為了返回json的注釋
@RequestMapping(value?=?“/getData“?method?=?RequestMethod.POST)
public?@ResponseBody?String?getData(@ModelAttribute(value?=?“student“)?Student?student
@Param(value?=?“rows“)?Integer?rows?@Param(value?=?“page“)?Integer?page)?{
Integer

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-03-29?11:42??maven\
?????文件????????1674??2019-04-03?14:32??maven\.classpath
?????文件????????1081??2019-03-28?20:42??maven\.project
?????目錄???????????0??2019-03-30?09:18??maven\.settings\
?????文件?????????639??2019-03-28?20:42??maven\.settings\.jsdtscope
?????文件?????????478??2019-03-28?20:42??maven\.settings\org.eclipse.jdt.core.prefs
?????文件??????????90??2019-03-28?20:42??maven\.settings\org.eclipse.m2e.core.prefs
?????文件?????????745??2019-03-28?20:49??maven\.settings\org.eclipse.wst.common.component
?????文件?????????252??2019-03-28?20:42??maven\.settings\org.eclipse.wst.common.project.facet.core.xml
?????文件??????????49??2019-03-28?20:42??maven\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2019-03-28?20:42??maven\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件??????????50??2019-03-28?20:42??maven\.settings\org.eclipse.wst.validation.prefs
?????文件????????4860??2019-04-03?14:36??maven\pom.xml
?????目錄???????????0??2019-03-29?11:42??maven\src\
?????目錄???????????0??2019-03-29?11:42??maven\src\main\
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\com\
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\com\scce\
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\com\scce\controller\
?????文件????????3450??2019-04-02?10:34??maven\src\main\java\com\scce\controller\StudentController.java
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\com\scce\dao\
?????文件?????????540??2019-04-02?09:40??maven\src\main\java\com\scce\dao\StudentMapper.java
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\com\scce\entity\
?????文件?????????713??2019-04-01?15:48??maven\src\main\java\com\scce\entity\Student.java
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\com\scce\mapping\
?????文件????????1578??2019-04-02?09:41??maven\src\main\java\com\scce\mapping\StudentMapper.xml
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\com\scce\service\
?????目錄???????????0??2019-03-29?11:42??maven\src\main\java\com\scce\service\impl\
?????文件????????1622??2019-04-02?09:44??maven\src\main\java\com\scce\service\impl\StudentServiceImpl.java
?????文件?????????444??2019-04-02?09:32??maven\src\main\java\com\scce\service\IStudentService.java
?????目錄???????????0??2019-04-03?14:51??maven\src\main\resources\
............此處省略48個文件信息

評論

共有 條評論