-
大小: 3.58MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-09-11
- 语言: Java
- 标签: Android;java
资源简介
使用android平台做前端,javaWeb的SSM框架做服务器的一个简易学生管理系统,用于学习使用。
使用android平台做前端,javaWeb的SSM框架做服务器的一个简易学生管理系统,用于学习使用。
代码片段和文件信息
package bnuz.lwj.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
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.ResponseBody;
import com.google.gson.GsonBuilder;
import bnuz.lwj.po.Student;
import bnuz.lwj.service.StudentService;
@Controller
@RequestMapping(“/Student“)
public class StudentControllor {
String userType;
Integer userid;
@Autowired
private StudentService studentService;
//查找学生信息
// /Student/queryStudent.action
//防止中文乱码,produces = “text/html;charset=UTF-8
@RequestMapping(value=“/queryStudent“produces = “text/html;charset=UTF-8“)
@ResponseBody
public String queryStudent(HttpServletRequest requestHttpServletResponse responseHttpSession session)throws Exception{
userType=(String)session.getAttribute(“userType“);
userid=(Integer)session.getAttribute(“userid“);
System.out.println(“客户端--queryStudent-Session:“+userid);
Student studentInf=studentService.findStudentById(userid);
System.out.println(studentInf.toString());
GsonBuilder gson = new GsonBuilder();
gson.disableHtmlEscaping();
String jsonStudentInf=“{\“student\“:“ + gson.create().toJson(studentInf) + “}“;
System.out.println(gson.create().toJson(studentInf));
return jsonStudentInf;
}
//提交修改学生信息操作
// /Student/editStudentSubmit.action
@RequestMapping(“/editStudentSubmit“)
public String editStudentSubmit(HttpServletRequest requestHttpServletResponse responseHttpSession session)throws Exception{
//传值到jsp
userType=(String)session.getAttribute(“userType“);
userid=(Integer)session.getAttribute(“userid“);
System.out.println(“服务器学生端--editStudentSubmit-Session:“+userid);
Student student=new Student();
student.setId(userid);
student.setName(request.getParameter(“name“));
student.setSex(request.getParameter(“sex“));
student.setAge(Integer.valueOf(request.getParameter(“age“)));
student.setGrade(request.getParameter(“grade“));
student.setScore(Double.valueOf(request.getParameter(“score“)));
System.out.println(“服务端修改学生:“+student.toString());
studentService.updateStudent(student);
return “redirect:/Student/queryStudent.action“;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-07-14 17:09 StudentSystem-Android\
文件 842 2017-06-02 15:22 StudentSystem-Android\.classpath
文件 1063 2017-06-02 15:17 StudentSystem-Android\.project
目录 0 2017-06-13 12:56 StudentSystem-Android\.settings\
文件 364 2017-06-02 15:22 StudentSystem-Android\.settings\org.eclipse.jdt.core.prefs
文件 122 2017-06-02 15:22 StudentSystem-Android\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 1778 2017-06-06 19:56 StudentSystem-Android\AndroidManifest.xm
目录 0 2017-07-14 17:09 StudentSystem-Android\bin\
文件 1778 2017-06-07 22:55 StudentSystem-Android\bin\AndroidManifest.xm
文件 860664 2017-06-07 23:56 StudentSystem-Android\bin\StudentSystem-Android.apk
目录 0 2017-06-13 12:56 StudentSystem-Android\bin\classes\
目录 0 2017-06-13 12:56 StudentSystem-Android\bin\classes\bnuz\
目录 0 2017-06-13 12:56 StudentSystem-Android\bin\classes\bnuz\lwj\
目录 0 2017-06-13 12:56 StudentSystem-Android\bin\classes\bnuz\lwj\adapter\
文件 628 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\adapter\StuinfoAdapter$ViewHolder.class
文件 3134 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\adapter\StuinfoAdapter.class
目录 0 2017-06-13 12:56 StudentSystem-Android\bin\classes\bnuz\lwj\po\
文件 986 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\po\Loginflag.class
文件 1974 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\po\Student.class
文件 1421 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\po\User.class
目录 0 2017-06-13 12:56 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\
文件 369 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\BuildConfig.class
文件 1905 2017-06-07 23:30 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\MainActivity$1.class
文件 3286 2017-06-07 23:30 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\MainActivity.class
文件 376 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\R$attr.class
文件 497 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\R$dimen.class
文件 707 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\R$drawable.class
文件 3004 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\R$id.class
文件 633 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\R$layout.class
文件 424 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\R$menu.class
文件 508 2017-06-07 22:55 StudentSystem-Android\bin\classes\bnuz\lwj\studentsystem_android\R$string.class
............此处省略241个文件信息
评论
共有 条评论