content
9. Administrator - Student Management - Add Students
10. Administrator--Student Management-Manage Students
11. Administrator - Teacher Management - Add Teacher
12. Admin - Teacher Management - Manage Teachers
1. Other system implementation
1. JavaWeb system series implementation
2. JavaSwing system series implementation
JavaWeb system series implementation
Java+JSP Realization of Student Book Management System
Java+JSP Realization of Student Information Management System
Java+JSP Realization of User Information Management System
Java+Servlet+JSP Realization of Airline Booking System
Java+Servlet+JSP Realization of News Release System
Java+Servlet+JSP Student Dormitory Management System
Java+Servlet+JSP Realization of Book Management System
Java+Servlet+JSP Realization of Student Information Management System
Java+Servlet+JSP to realize student course selection management system
Java+Servlet+JSP realizes student achievement management system-1
Java+Servlet+JSP realizes student achievement management system-2
Java+Servlet+JSP realizes pet clinic management system
Java+SSM+JSP Realization of Online Exam System
Java+SSH+JSP Realization of Online Exam System
Java+SSH+JSP Realization of Hospital Online Registration System
Java+Springboot+Mybatis+Bootstrap+Maven to realize online mall system
1. System introduction
1. Development environment
Development tools: IDEA2018.2
JDK version: jdk1.8
Mysql version: 8.0.13
2. Technical selection
后端:Java+Spring+SpringMVC+Mybatis。
Front-end: Layui+JSP+HTML+CSS.
3. System function
log in system
1. Students
My Grades: View individual grades.
Modify Password: Modify the system login password.
2. Teacher
Entry grades: Enter and modify student grades.
Modify Password: Modify the system login password.
3. Administrator
Student management: Add, delete, modify and check student information.
Teacher management: Add, delete, modify, and check teacher information.
4. Database
/*
Navicat Premium Data Transfer
Source Server : MySQL
Source Server Type : MySQL
Source Server Version : 80013
Source Host : 127.0.0.1:3306
Source Schema : ssm_score
Target Server Type : MySQL
Target Server Version : 80013
File Encoding : 65001
Date: 01/09/2021 21:45:11
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES (1, 'admin', 'admin');
-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`stuclass` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`stuname` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`stuno` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`score` double NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of student
-- ----------------------------
INSERT INTO `student` VALUES (8, 'a', '123456', '1702', '乔乔丫', '1700130222', 1000);
INSERT INTO `student` VALUES (9, 'b', '123456', '1702', '周瑜', '1700130223', 100);
INSERT INTO `student` VALUES (10, 'c', '123456', '1703', '曹操', '1700130224', 6);
INSERT INTO `student` VALUES (11, 'd', '123456', '1704', '小美', '1700130225', 90);
INSERT INTO `student` VALUES (12, 'e', '123456', '1701', '王菲', '1700130226', 100);
INSERT INTO `student` VALUES (13, 'f', '123456', '1703', '周杰伦', '1700130227', NULL);
-- ----------------------------
-- Table structure for teacher
-- ----------------------------
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
`teaname` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of teacher
-- ----------------------------
INSERT INTO `teacher` VALUES (3, 'root', '123456', '李老师');
INSERT INTO `teacher` VALUES (7, 'a', '123456', '孟老师');
INSERT INTO `teacher` VALUES (5, 'b', '123456', '赵老师');
INSERT INTO `teacher` VALUES (6, 'c', '123456', '李老师');
SET FOREIGN_KEY_CHECKS = 1;
5. Project screenshot
2. System display
1. Log in to the system
2. Students - Main Page
3. Student - My Grades
4. Student - change password
5. Faculty - Main Page
6. Teacher - enter grades
7. Teacher - change password
8. Admin - Main Page
9. Administrator - Student Management - Add Students
10. Administrator--Student Management-Manage Students
11. Administrator - Teacher Management - Add Teacher
12. Admin - Teacher Management - Manage Teachers
3. Part of the code
AdminController
package com.hhtc.controller;
import java.util.List;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.hhtc.po.Page;
import com.hhtc.po.Student;
import com.hhtc.po.Teacher;
import com.hhtc.service.AdminService;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@Controller
public class AdminController {
@Autowired
private AdminService adminService;
@RequestMapping("/welcome")
public ModelAndView welcome(Model model) {
ModelAndView mav = new ModelAndView("admin/welcome");
return mav;
}
//学生
//学生数据分页
@RequestMapping(value = "/liststudent",method = {RequestMethod.POST, RequestMethod.GET},produces ="application/json;charset=UTF-8")
@ResponseBody
public String liststudent(Page page) {
List<Student> list=adminService.stumanage();
page.caculatestart();
List<Student> list2=adminService.liststudent(page);
JSONObject jsonobj=new JSONObject();
jsonobj.put("code", 0);
jsonobj.put("msg", "成功");
jsonobj.put("count",list.size());
JSONArray jsonobj2=new JSONArray();
JSONObject jsonobj3=new JSONObject();
for(Student student:list2) {
jsonobj3.put("id",student.getId());
jsonobj3.put("username",student.getUsername());
jsonobj3.put("password",student.getPassword());
jsonobj3.put("stuclass",student.getStuclass());
jsonobj3.put("stuname",student.getStuname());
jsonobj3.put("stuno",student.getStuno());
jsonobj2.add(jsonobj3);
}
jsonobj.put("data", jsonobj2);
return jsonobj.toString();
}
@RequestMapping("/addstudent")
public ModelAndView addstu(Student student,Model model) {
adminService.addStudent(student);
ModelAndView mav = new ModelAndView("admin/stumanage");
return mav;
}
@RequestMapping("/delstu")
public ModelAndView delstu(String id,Model model) {
adminService.delstudnet(id);
ModelAndView mav = new ModelAndView("admin/stumanage");
return mav;
}
@RequestMapping("/updatestu")
public ModelAndView updatestu(String id,Student student,Model model) {
student.setId(Integer.parseInt(id));
adminService.updatestu(student);
ModelAndView mav = new ModelAndView("admin/stumanage");
return mav;
}
@RequestMapping(value = "/mohuname",method = {RequestMethod.POST, RequestMethod.GET},produces ="application/json;charset=UTF-8")
@ResponseBody
public String mohuname(HttpSession session) {
@SuppressWarnings("unchecked")
List<Student> list=(List<Student>) session.getAttribute("list");
JSONObject jsonobj=new JSONObject();
jsonobj.put("code", 0);
jsonobj.put("msg", "成功");
jsonobj.put("count",list.size());
JSONArray jsonobj2=new JSONArray();
JSONObject jsonobj3=new JSONObject();
for(Student student:list) {
jsonobj3.put("id",student.getId());
jsonobj3.put("username",student.getUsername());
jsonobj3.put("password",student.getPassword());
jsonobj3.put("stuclass",student.getStuclass());
jsonobj3.put("stuname",student.getStuname());
jsonobj3.put("stuno",student.getStuno());
jsonobj2.add(jsonobj3);
}
jsonobj.put("data", jsonobj2);
return jsonobj.toString();
}
//老师
@RequestMapping("/addtea")
public ModelAndView addteacher(Teacher teacher,Model model) {
adminService.addteacher(teacher);
ModelAndView mav = new ModelAndView("admin/teamanage");
return mav;
}
@RequestMapping(value = "/teamanage",method = {RequestMethod.POST, RequestMethod.GET},produces ="application/json;charset=UTF-8")
@ResponseBody
public String teamanage(Model model) {
List<Teacher> list=adminService.teamanage();
JSONObject jsonobj=new JSONObject();
jsonobj.put("code", 0);
jsonobj.put("msg", "成功");
jsonobj.put("count",list.size());
JSONArray jsonobj2=new JSONArray();
JSONObject jsonobj3=new JSONObject();
for(Teacher teacher:list) {
jsonobj3.put("id",teacher.getId());
jsonobj3.put("username",teacher.getUsername());
jsonobj3.put("password",teacher.getPassword());
jsonobj3.put("teaname",teacher.getTeaname());
jsonobj2.add(jsonobj3);
}
jsonobj.put("data", jsonobj2);
return jsonobj.toString();
}
@RequestMapping("/deltea")
public ModelAndView deltea(String id,Model model) {
adminService.delteacher(id);
ModelAndView mav = new ModelAndView("admin/teamanage");
return mav;
}
@RequestMapping("/updatetea")
public ModelAndView updatetea(String id,Teacher teacher,Model model) {
teacher.setId(Integer.parseInt(id));
adminService.updatetea(teacher);
ModelAndView mav = new ModelAndView("admin/teamanage");
return mav;
}
@RequestMapping(value = "/mohunametea",method = {RequestMethod.POST, RequestMethod.GET},produces ="application/json;charset=UTF-8")
@ResponseBody
public String mohunametea(HttpSession session) {
@SuppressWarnings("unchecked")
List<Teacher> list=(List<Teacher>) session.getAttribute("tealist");
JSONObject jsonobj=new JSONObject();
jsonobj.put("code", 0);
jsonobj.put("msg", "成功");
jsonobj.put("count",list.size());
JSONArray jsonobj2=new JSONArray();
JSONObject jsonobj3=new JSONObject();
for(Teacher teacher:list) {
jsonobj3.put("id",teacher.getId());
jsonobj3.put("username",teacher.getUsername());
jsonobj3.put("password",teacher.getPassword());
jsonobj3.put("teaname",teacher.getTeaname());
jsonobj2.add(jsonobj3);
}
jsonobj.put("data", jsonobj2);
return jsonobj.toString();
}
}
HrefController
package com.hhtc.controller;
import java.util.List;
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.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.hhtc.po.Student;
import com.hhtc.po.Teacher;
import com.hhtc.service.AdminService;
@Controller
public class HrefController {
@Autowired
private AdminService adminService;
@RequestMapping("/index")
public ModelAndView index(Model model) {
ModelAndView mav = new ModelAndView("index");
return mav;
}
//学生
@RequestMapping("/hrefaddstu")
public ModelAndView addstu(Model model) {
ModelAndView mav = new ModelAndView("admin/addstu");
return mav;
}
@RequestMapping("/hrefmohuname")
public ModelAndView hrefmohuname(String stuname,Model model,HttpSession session) {
List<Student> list=adminService.selectbyname(stuname);
session.setAttribute("list", list);
ModelAndView mav = new ModelAndView("admin/mohuname");
return mav;
}
@RequestMapping("/hrefxiustu")
public String xiustu(String id,Model model) {
Student student=adminService.selectone(id);
model.addAttribute("student",student);
return "admin/updatestu";
}
@RequestMapping("/hrefstumanage")
public ModelAndView hrefstumanage(Model model) {
ModelAndView mav = new ModelAndView("admin/stumanage");
return mav;
}
//老师
@RequestMapping("/hrefaddtea")
public ModelAndView hrefaddtea(Model model) {
ModelAndView mav = new ModelAndView("admin/addtea");
return mav;
}
@RequestMapping("/hrefteamanage")
public ModelAndView hrefteamanage(Model model) {
ModelAndView mav = new ModelAndView("admin/teamanage");
return mav;
}
@RequestMapping("/hrefmohunametea")
public ModelAndView hrefmohunametea(String teaname,Model model,HttpSession session) {
List<Teacher> list=adminService.selectbynametea(teaname);
session.setAttribute("tealist",list);
ModelAndView mav = new ModelAndView("admin/mohuname2");
return mav;
}
@RequestMapping("/hrefxiutea")
public String hrefxiutea(String id,Model model) {
Teacher teacher=adminService.selectonetea(id);
model.addAttribute("teacher",teacher);
return "admin/updatetea";
}
}
LoginController
package com.hhtc.controller;
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.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.hhtc.po.Admin;
import com.hhtc.po.Student;
import com.hhtc.po.Teacher;
import com.hhtc.service.LoginService;
@Controller
public class LoginController {
@Autowired
private LoginService loginService;
@RequestMapping("/login")
public ModelAndView findCustomerById(String username,String password,String people,Model model,HttpSession session) {
if("student".equals(people)) {
Student student=new Student();
student.setUsername(username);
student.setPassword(password);
Student student2=loginService.findStuTeachByUsername(student);
if(student2!=null) {
session.setAttribute("student", student2);
ModelAndView mav = new ModelAndView("/student/indexs");
return mav;
}else {
ModelAndView mav = new ModelAndView("error");
return mav;
}
}else if("teacher".equals(people)){
Teacher teacher=new Teacher();
teacher.setUsername(username);
teacher.setPassword(password);
Teacher teacher2=loginService.findTeachByUsername(teacher);
if(teacher2!=null) {
session.setAttribute("teacher", teacher2);
ModelAndView mav = new ModelAndView("/teacher/indext");
return mav;
}else {
ModelAndView mav = new ModelAndView("error");
return mav;
}
}else if("manage".equals(people)){
Admin admin =new Admin();
admin.setUsername(username);
admin.setPassword(password);
if(loginService.findAdminById(admin)!=null) {
ModelAndView mav = new ModelAndView("/admin/index");
return mav;
}else {
ModelAndView mav = new ModelAndView("error");
return mav;
}
}
ModelAndView mav = new ModelAndView("error");
return mav;
}
@RequestMapping("/out")
public ModelAndView out(HttpServletResponse response,HttpSession session,Model model) {
ModelAndView mav = new ModelAndView("index");
return mav;
}
}
StudentController
package com.hhtc.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.hhtc.po.Student;
import com.hhtc.service.GeneraService;
@Controller
public class StudentController {
@Autowired
private GeneraService generaService;
//学生
@RequestMapping("/hrefstuinfo")
public ModelAndView hrefstuinfo(Model model) {
ModelAndView mav = new ModelAndView("student/stuinfo");
return mav;
}
@RequestMapping("/hrefupdatepws")
public ModelAndView hrefupdatepws(Model model) {
ModelAndView mav = new ModelAndView("student/updatepws");
return mav;
}
@RequestMapping("/updatepws")
public ModelAndView updatepws(Student student,Model model) {
this.generaService.updatepws(student);
ModelAndView mav = new ModelAndView("success");
return mav;
}
}
TeachController
package com.hhtc.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.hhtc.po.Page;
import com.hhtc.po.Student;
import com.hhtc.po.Teacher;
import com.hhtc.service.AdminService;
import com.hhtc.service.GeneraService;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@Controller
public class TeachController {
@Autowired
private AdminService adminService;
@Autowired
private GeneraService generaService;
@RequestMapping("/hrefaddscore")
public ModelAndView hrefaddscore(Model model) {
ModelAndView mav = new ModelAndView("teacher/addscore");
return mav;
}
@RequestMapping("/hrefupdatepw")
public ModelAndView hrefupdatepw(Model model) {
ModelAndView mav = new ModelAndView("teacher/updatepw");
return mav;
}
@RequestMapping(value = "/stuscore",method = {RequestMethod.POST, RequestMethod.GET},produces ="application/json;charset=UTF-8")
@ResponseBody
public String stuscoree(Page page,Model model) {
List<Student> list=adminService.stumanage();
page.caculatestart();
List<Student> list2=adminService.liststudent(page);
JSONObject jsonobj=new JSONObject();
jsonobj.put("code", 0);
jsonobj.put("msg", "成功");
jsonobj.put("count",list.size());
JSONArray jsonobj2=new JSONArray();
JSONObject jsonobj3=new JSONObject();
for(Student student:list2) {
jsonobj3.put("id",student.getId());
jsonobj3.put("stuno", student.getStuno());
jsonobj3.put("stuname",student.getStuname());
jsonobj3.put("stuclass",student.getStuclass());
jsonobj3.put("score",student.getScore());
jsonobj2.add(jsonobj3);
}
jsonobj.put("data", jsonobj2);
return jsonobj.toString();
}
@RequestMapping("/updatepw")
public ModelAndView updatepw(Teacher teacher,Model model) {
this.generaService.updatepw(teacher);
ModelAndView mav = new ModelAndView("success");
return mav;
}
@RequestMapping("/updatescore")
public ModelAndView updatescore(String id,String score,Model model) {
Student student=new Student();
student.setId(Integer.parseInt(id));
student.setScore(score);
this.generaService.updatescore(student);
ModelAndView mav = new ModelAndView("teacher/addscore");
return mav;
}
}
4. Other
1. Other system implementation
1. JavaWeb system series implementation
Java+JSP Realization of Student Book Management System
Java+JSP Realization of Student Information Management System
Java+JSP Realization of User Information Management System
Java+Servlet+JSP Realization of Airline Booking System
Java+Servlet+JSP Realization of News Release System
Java+Servlet+JSP Realization of Book Management System
Java+Servlet+JSP Realization of Parking Lot Management System
Java+Servlet+JSP Realization of Student Information Management System
Java+Servlet+JSP to realize student course selection management system
Java+Servlet+JSP realizes student achievement management system-1
Java+Servlet+JSP realizes student achievement management system-2
Java+Servlet+JSP realizes pet clinic management system
Java+SSM+JSP Realization of Online Exam System
Java+SSH+JSP Realization of Online Exam System
Java+SSH+JSP Realization of Hospital Online Registration System
Java+Springboot+Mybatis+Bootstrap+Maven to realize online mall system
2. JavaSwing system series implementation
Java+Swing implements Doudizhu game
Java+Swing realizes book management system
Java+Swing realizes hospital management system
Java+Swing realizes examination management system
Java+Swing implements warehouse management system-1
Java+Swing implements warehouse management system-2
Java+Swing realizes automatic teller machine system
Java+Swing implements address book management system
Java+Swing realizes parking lot management system
Java+Swing Realization of Student Information Management System
Java+Swing realizes student dormitory management system
Java+Swing implements student course selection management system
Java+Swing realizes student achievement management system
Java+Swing realizes school textbook management system
Java+Swing realizes school education management system
Java+Swing realizes enterprise personnel management system
Java+Swing realizes electronic album management system
Java+Swing realizes supermarket management system-TXT storage data
Java+Swing realizes self-service teller system-TXT storage data
Java+Swing realizes pet store management system-TXT storage data
2. Get the source code
Click the link below to get the source code, the database file is under the sql file.
Java+SSM+Mysql+Layui realizes student achievement management system
Contact QQ: 3079118617
3. Run the project
Please click the link below to deploy your project.
How IDEA Imports JavaWeb Project Super Detailed Video Tutorial
4. Remarks
If there is any infringement, please contact me to delete it.
5. Support Bloggers
If you think this article is helpful to you, please like, follow and favorite. wish you a happy life! If you want to get other resources, you can follow the WeChat public account on the left to get it!