This article is participating in the “Digitalstar Project” to win a creative gift package and challenge the creative incentive money.

πŸ… Author’s home page: Java Li Yangyong

πŸ… Home page Contact πŸ… to obtain the source code

Near the end of the semester, or graduation project, you are still doing Java program network programming, the final homework, the teacher’s homework requirements feel too big? Don’t know what to do with the graduation project? Are there too many web features? Don’t have the right type or system? And so on. Here, any problem you want to solve, can be met here. Original Jsp, SSM, SpringBoot, as well as HTML+CSS+JS page design, web college student web page design source code and so on can be referenced to be solved. Without further ado, take a student information management system as an example

​

Abstract:

The system design for convenience and safety as the starting point, abandon the traditional manual record of the defects and deficiencies of student information management, using a new way for the school to store and maintain student information, increase management efficiency. The system is generally divided into three modules, such as administrator login management background, student login course selection and teaching to the teacher, and gives the administrator many functions to operate this system, including: student management, teacher management, course selection management, password modification and other functions; It provides students with the functions of course inquiry, selection and password modification. Through the design of these functional modules, the functions required by the teacher to control the information of students are satisfied. The system uses B/S three-layer structure, JSP technology is used for the production of dynamic pages. In order to realize the safety and reliability of the management system and to consider some codes can be reused, the important code of the program is encapsulated by Java Bean. The system carries out the people-oriented thought, high practicability.

System function Overview:

The main module design is as follows:

Shiro authority management framework is used to realize login authentication and storage of login information, distribute authority roles according to different login accounts, and set roles for different page urls.

The administrator can add, delete, change and check the teacher information, student information and course information. The administrator account can reset the password of non-administrator account.

Course Management: When a student has successfully enrolled in a course, the student management cannot be deleted. When the student information is added, the information will also be added to the login table

Account password reset:

When a teacher logs in, he or she can get a list of the classes that he or she is teaching, and he or she can grade the class that he or she has chosen and can’t re-grade the class that he or she has graded

After logging in, students can obtain the courses they have selected and completed according to their information

All courses: select courses here, and the selected courses will be automatically redirected to the selected courses

Selected courses: this shows the courses that have not been completed, that is, the teacher has not given the grades, so it can be canceled here

Completed course: indicates that the course has been completed and the teacher has changed the password of the graded course:

Screenshots of main functions:

User login: Users can select roles to log in: administrator, teacher, and student

​

System home page: after the administrator logs in, the specific function module can add, delete, change and check the teacher information, student information and course information. The administrator account can reset the password of the non-administrator account.

​

Course management: manage course list and add courses

​

Add input course information

​

Student management: student list management and add students and other specific operations

​

Add Student information​

Teacher management:

​

File upload and download:

File list and download files

​

File upload

​

Account related:

​

After teachers log in, the main page displays:

View lecture list

​

View student information for this course

​

Grade students’ grades

​

Student User Login:

Based on the student’s information, obtain the courses that he/she has selected and completed​

Main code display:

Login related

package com.system.controller; import com.system.exception.CustomException; import com.system.po.Userlogin; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.Subject; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; */ @controller public class LoginController {@requestMapping (value = "/login", method = {RequestMethod.GET}) public String loginUI() throws Exception { return ".. /.. /login"; } @requestMapping (value = "/login", Method = {requestmethod. POST}) public String login(Userlogin Userlogin) throws Exception {//Shiro Implements login UsernamePasswordToken token = new UsernamePasswordToken(userlogin.getUsername(), userlogin.getPassword()); Subject subject = SecurityUtils.getSubject(); // If the user name cannot be obtained, the login fails. If the login fails, the subject.login(token) exception is directly thrown. if (subject.hasRole("admin")&userlogin.getRole()==0) { return "redirect:/admin/showStudent"; } else if (subject.hasRole("teacher")&userlogin.getRole()==1) { return "redirect:/teacher/showCourse"; } else if (subject.hasRole("student")&userlogin.getRole()==2) { return "redirect:/student/showCourse"; }else throw new CustomException(" Please login with the correct id "); }}Copy the code

File upload

package com.system.controller; import com.system.po.FileVO; import com.system.service.FileService; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.commons.CommonsMultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.net.URLEncoder; import java.util.UUID; @controller @requestMapping ("/file") public class FileController {@resource (name = "fileServiceImpl") private FileService fileService; @RequestMapping("/upload") public String fileUpload(@RequestParam MultipartFile file, FileVO filevo, HttpServletRequest Request) throws IOException {// Save the upload path Settings // Write the file to disk String fileName = file.getoriginalfilename (); String[] str = fileName.split("\."); String uuid = UUID.randomUUID().toString().replaceAll("-",""); String headPath = "E://upload/" + uuid+ "."+str[str.length-1]; File dest = new File(headPath); file.transferTo(dest); filevo.setFileID(uuid); filevo.setFilePath(headPath); filevo.setUserID(null); try { fileService.save(filevo); } catch (Exception e) { e.printStackTrace(); } return "redirect:/admin/showFile"; } @RequestMapping("/downFile") public void down(HttpServletRequest request, HttpServletResponse response,String fileID) throws Exception{ FileVO fileVO = fileService.findById(fileID); String fileName = fileVO.getFilePath(); String[] str = fileName.split("\."); InputStream bis = new BufferedInputStream(new FileInputStream(new File(fileName))); String filename = fileVO.getFileName()+"\."+str[str.length-1]; filename = URLEncoder.encode(filename,"UTF-8"); response.addHeader("Content-Disposition", "attachment; filename=" + filename); response.setContentType("multipart/form-data"); BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream()); int len = 0; while((len = bis.read()) ! = -1){ out.write(len); out.flush(); } out.close(); }}Copy the code

Exception handling

package com.system.exception; /** * Public class CustomException extends Exception {// Public String message; public CustomException(String message) { super(message); this.message=message; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; }}Copy the code

Main database design:

The main data tables are: major table, class schedule, document information table, role table, student selection table, teacher table, student table and so on

CREATE TABLE 'college' (' collegeID 'int(11) NOT NULL,' collegeName 'varchar(200) NOT NULL COMMENT' 葨 名', PRIMARY KEY (`collegeID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*Data for the table 'college' */ insert into 'college' values (1,' collegeID '), (2,' collegeName '), (3,' Department of Finance '); /*Table structure for table `course` */ DROP TABLE IF EXISTS `course`; CREATE TABLE 'course' (' courseID 'int(11) NOT NULL,' courseName 'varchar(200) NOT NULL COMMENT' courseID ', 'teacherID' int(11) NOT NULL, 'courseTime' varchar(200) DEFAULT NULL COMMENT 'teacherID ', 'classRoom' varchar(200) DEFAULT NULL COMMENT 'Start location ',' courseWeek 'int(200) DEFAULT NULL COMMENT' start time ', 'courseType' varchar(20) DEFAULT NULL COMMENT 'courseType' varchar(20) DEFAULT NULL COMMENT 'courseType' varchar(20) DEFAULT NULL COMMENT 'collegeID' int(11) NOT NULL COMMENT 'iD ', 'score' int(11) NOT NULL COMMENT 'credits ', PRIMARY KEY (' courseID'), KEY 'collegeID' (' collegeID '), KEY `teacherID` (`teacherID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*Data for the table `course` */ insert into `course`(`courseID`,`courseName`,`teacherID`,`courseTime`,`classRoom`,`courseWeek`,`courseType`,`collegeID`,`score`) Values (1, "C language program design, 1001, 'Tuesday', '401', 18, 'compulsory', 1, 3), (2, 'Python crawler technique, 1001,' on Thursday, 'X402, 18,' compulsory ', 1, 3), (3, 'data structures, 1001,' on Thursday ', '401', 18, 'compulsory', 1, 2), (4, 'a Java program design, 1002,' Friday ', '401', 18, 'compulsory', 1, 2), (5, 1002, 'English', 'on Thursday,' X302, 18, 'compulsory', 2, 2), (6, 'fashion design, 1003,' Monday ', '401', 18, 'elective', 2, 2); /*Table structure for table `role` */ DROP TABLE IF EXISTS `role`; CREATE TABLE `role` ( `roleID` int(11) NOT NULL, `roleName` varchar(20) NOT NULL, 'Permissions' varchar(255) DEFAULT NULL COMMENT' permissions ', 'roleID') ENGINE=InnoDB DEFAULT CHARSET=utf8; /*Data for the table `role` */ insert into `role`(`roleID`,`roleName`,`permissions`) values (0,'admin',NULL), (1,'teacher',NULL), (2,'student',NULL); /*Table structure for table `selectedcourse` */ DROP TABLE IF EXISTS `selectedcourse`; CREATE TABLE `selectedcourse` ( `courseID` int(11) NOT NULL, `studentID` int(11) NOT NULL, 'mark' int(11) DEFAULT NULL COMMENT 'iD ', KEY' courseID '(' id'), KEY `studentID` (`studentID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*Data for the table `selectedcourse` */ insert into `selectedcourse`(`courseID`,`studentID`,`mark`) values (2100-01, 12), (1100-01 remarks), (1100-02,66), (2100-03 13), (5100-01, NULL), (3100-01, NULL), (1100-03, NULL), (4100-03, NULL); /*Table structure for table `student` */ DROP TABLE IF EXISTS `student`; CREATE TABLE `student` ( `userID` int(11) NOT NULL AUTO_INCREMENT, `userName` varchar(200) NOT NULL, 'sex' varchar(20) DEFAULT NULL, 'birthYear' date DEFAULT NULL COMMENT 'birthdate ',' grade 'date DEFAULT NULL COMMENT' school date ', 'collegeID' int(11) NOT NULL COMMENT 'collegeID ', PRIMARY KEY (' userID'), KEY `collegeID` (`collegeID`) ) ENGINE=InnoDB AUTO_INCREMENT=10008 DEFAULT CHARSET=utf8; /*Data for the table `student` */ insert into `student`(`userID`,`userName`,`sex`,`birthYear`,`grade`,`collegeID`) Values (9999, 'mike1' and 'male', '1996-09-03', '2019-11-13', 3), (10001, 'red' and 'male', '2020-03-02', '2020-03-02', 1), (10002, 'green' and 'male', '2020-03-10', '2020-03-10', 1), (10003, 'Chen', 'woman', '1996-09-02', '2015-09-02', 2), (10005, 'the left', 'woman', '1996-09-02', '2015-09-02', 2), (10007, 'MIke' and 'male', '1996-09-02', '2015-09-02', 2); /*Table structure for table `teacher` */ DROP TABLE IF EXISTS `teacher`; CREATE TABLE `teacher` ( `userID` int(11) NOT NULL AUTO_INCREMENT, `userName` varchar(200) NOT NULL, 'sex' varchar(20) DEFAULT NULL, 'birthYear' date NOT NULL, 'degree' varchar(20) DEFAULT NULL COMMENT 'title' varchar(255) DEFAULT NULL COMMENT '主 位 ',' grade 'date DEFAULT NULL COMMENT' 主 位 ', 'collegeID' int(11) NOT NULL COMMENT 'collegeID ', PRIMARY KEY (' userID'), KEY `collegeID` (`collegeID`) ) ENGINE=InnoDB AUTO_INCREMENT=1004 DEFAULT CHARSET=utf8; /*Data for the table `teacher` */ insert into `teacher`(`userID`,`userName`,`sex`,`birthYear`,`degree`,`title`,`grade`,`collegeID`) values (1001, 'liu', 'woman', '1990-03-08', 'master,' associate professor ', '2015-09-02', 2), (1002, 'zhang', 'woman', '1996-09-02', 'Dr', 'lecturers',' 2015-09-02 ', 1), (1003, 'soft' teacher 'and' female 'and' 1996-09-02 ', 'master,' ta ', '2017-07-07', 1); /*Table structure for table `userlogin` */ DROP TABLE IF EXISTS `userlogin`; CREATE TABLE `userlogin` ( `userID` int(11) NOT NULL AUTO_INCREMENT, `userName` varchar(200) NOT NULL, 'password' varchar(200) NOT NULL, 'role' int(11) NOT NULL DEFAULT '2' COMMENT 'PRIMARY KEY' (' userID '), KEY `role` (`role`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8; /*Data for the table `userlogin` */ insert into `userlogin`(`userID`,`userName`,`password`,`role`) values (1,'admin','123',0), (10,'10003','123',2), (11,'10005','123',2), (14,'1001','123',1), (15,'1002','123',1), (16, '1003', '123', 1), (20 '9999', '123', 2), (21, '10001', '123', 2), (22, '10002', '123', 2);Copy the code

Structure and catalogue design:

I. Introduction 4

1.1 Research Background 4

1.2 System Design Overview 4

1.3 Research Content 5

2. Introduction to related technologies 5

2.1 spring 5

Spring MVC 2.2 6

2.3 mybatis 7

2.4 JSP technology 7

JQuery 2.5 8

Mysql 2.6 8

Demand Analysis and Feasibility 11

3.1 System Functions 11

3.2 System Operating Environment 11

3.3 Technical Design 12

3.4 Social feasibility 12

3.5 Security Feasibility 12

3.6 Economic feasibility 12

3.7 Legal Feasibility 12

4. System Design 13

4.1 System Mode Architecture 13

4.2 System Hierarchical Architecture 13

4.3 Detailed design of system functions 14

4.4 Data Flow Figure 14

4.5 Source Code Architecture 15

5. System implementation 17

5.1 Program Main Category 17

5.1.1 User Login Class 17

5.1.2 Teacher Information 17

5.1.3 Role Rights 17

5.1.4 Course Information 17

5.1.5 Student Information 18

5.1.6 Courses selected by students 18

5.2 System Functions Main realization module Screenshot 18

5.2.1 Key code implementation 18

5.2.2 Some Functions Screenshot 23

Vi. Database Design

6.1 Basic design of Table 26

6.2 Requirements for Database Three paradigms: 26

6.3 Database table ER Figure 27

6.4 User Login Table Design 27

6.5 Teacher table design 28

6.6 Design of student Information Table 29

6.7 Design of Students’ Course Selection table 30

6.8 Role Permission Table Design 31

6.9 Curriculum Design 31

6.10 School Table Design 32

Vii. Development experience 33

Test Example 33

Ix. Refer to Text 34

Relevant system design and implementation recommendations:

Based on Java Springboot + Mybatis film ticket website management system front + background design and implementation

Design and implementation of winery internal management system based on Java SSM Springboot + Mybatis

Design and implementation of intelligent life sharing platform based on JAVA Springboot + Mybatis

Based on Java Springboot + VUE + Redis front and back end separation furniture mall platform system design and implementation

Design and implementation of anti-epidemic material information management system based on JAVA SSM Springboot

>>>

Ok, that’s all for today, thumbs up, favorites and comments. See you next time

Get the full source code:

Everyone likes, likes, follows, comments, check out the nuggets homepage for contact

Clocked articles updated 79/100 days