(Source code attached) SSM Online Examination System Computer Graduation Design 12795

Ssm online examination system

Summary

The rapid development of scientific and technological progress has caused tremendous changes in people's daily lives. The rapid development of electronic information technology has made the application level of electronic information technology in various fields popular and applied. The arrival of the information age has become an unstoppable fashion trend, and the history of human development is entering a new era. In actual application, the working rules and development steps of the application software are used to develop an online examination system based on the SSM framework.

This design mainly implements an online examination system that combines the advantages of humanization, high efficiency, convenience, etc., and completes functional modules such as homepage, system users, data information, data types, and test messages. The system communicates with the server through the browser to realize data interaction and changes. This system improves work efficiency and reduces errors and omissions in data storage through scientific management methods and convenient services. The online examination system is developed using the SSM framework based on the MVVM model. It is written using the MyEclipse 2017 CI 10 compiler. In terms of data, Microsoft's MySQL relational database is mainly used as the data storage medium, and is completed with the front-end HTML+CSS technology. System development.

Keywords : online examination system; MySQL; SSM 

Ssm Online Examination System

Abstract

The rapid development of technology has caused tremendous changes in people's daily lives, and the rapid development of electronic information technology has popularized and applied the application level of electronic information technology in various fields. The arrival of the information age has become an unstoppable fashion trend, and the history of human development is entering a new era. In practical applications, the working rules and development steps of the application software are developed using the SSM framework based on an online exam system.

This design mainly implements an online exam system that combines the advantages of humanization, efficiency, and convenience. It completes functional modules such as homepage, system users, data information, data types, and exam messages. The system communicates with the server through a browser to achieve data interaction and changes. This system improves work efficiency and reduces errors and omissions in data storage through scientific management and convenient services. The development of the online examination system is based on the SSM framework based on the MVVM mode. It is written using the MyEclipse 2017 CI 10 compiler. In terms of data, Microsoft's MySQL relational database is mainly used as the data storage medium, and the system development is completed with the foreground HTML+CSS technology.

Key words:Online examination system; MySQL; SSM

Table of contents

1 Overview

1.1 Topic selection background

1.2 Source of the topic and research purpose

1.3 Organizational structure of this article

2 Introduction to system development tools

2.1 J2EE technology

2. 2  MySQL database

2.3 Introduction  to SSM framework

2. 4  Working principle of B/S system

3 System Analysis 6

3.1 Feasibility analysis 6

3.1.1 Technical feasibility 6

3.1.2 Operational feasibility 6

3.1.3 Economic feasibility7

3.1.4 Legal feasibility 7

3.2 System process analysis 7

3.2.1 System development process 7

3.2.2 User login process

3.2.3 System operation process

3.2.4 Add information process

3.2.5 Modify information flow

3.2.6 Deletion of information process

3.3 System use case analysis

3.3.1 Administrator use case diagram

4 system design

4.1 System Overview

4.2 System structure design

4.3 Database Design 14

4.3.1 Database design principles

4.3.2 Database entities

4.3.3 Database table design

5 system detailed design 24

5.1 Implementation of login module 24

5.2 Implementation of registration module 30

5. 3 Implementation of data information collection module 31

5.4 Implementation of comment module 31

5. 5 Implementation of exam message module 31

5. 6 Implementation of password modification module 32

5. 7 Implementation of system announcement module 33

5. 8 Implementation of user management module 3 5

5. 9 Implementation of data type management module 3 6

6 System Test 37

6.1 The significance of system testing

6.2 Test method 38

6.3 Test analysis

Conclusion 4     0

Acknowledgments 4     1

References 42

1 Overview

1.1Background

Nowadays, major institutions, both domestic and foreign, have continuously launched a series of large-scale certification exams, such as Microsoft's MCSE, Cisco's CCNA, our country's self-study exams and various exams in various provinces and cities. These exams are With the development in the direction of networking, only in this way can large-scale examinations be time-saving, labor-saving, fair and open. Therefore, the development of online examination systems is an important topic in today's education informatization construction. The purpose is to make full use of the school's existing computer software and hardware resources and network resources to implement paperless examinations to make up for the shortcomings of traditional manual examinations. Web-based online exams have become a general trend. Compared with traditional exam models, online exams incorporate more technical links and put forward higher technical requirements for ways and methods to achieve security. It plays an important role in the process of educational modernization. It has very important practical significance. Traditional examinations require teachers to engrave examination papers, print examination papers, arrange examinations, invigilate examinations, collect examination papers, mark examination papers, comment on examination papers and analyze examination papers. This is a long and complicated process, which has become increasingly unsuitable for the needs of modern teaching, thus giving birth to A large number of online examination systems. It applies network software development tools such as ssm for research and development, and makes full use of the characteristics of the B/S structure. Its functional goal is to transform the existing paper-based examination into a paperless examination system based on the Internet. It has good Openness allows system administrators to manage and develop the test question bank, effectively ensuring the timeliness of the question bank. Implementing online examinations through the Internet/Intranet can realize the separation of teaching and examination and fully automated management of examination work. It can effectively utilize the software and hardware resources of the campus network to maximize its effectiveness and better serve the school's teaching, scientific research, and management. service, which can reduce the examination paper organization, approval and printing, transmission and collection, registration and distribution, evaluation and archiving in the traditional examination process to one or two links, almost blocking the possibility of direct manual intervention in examination activities, not only saving money It requires a lot of time, manpower, material and financial resources, and can also greatly improve the objectivity and fairness of test scores.

The WEB-based multi-user online examination system developed using SSM technology has functions such as user registration, multi-user simultaneous online examination, system announcements, material information, material types, examination messages, etc....

1. 2 Source of the topic and research purpose 

With the rapid development of information technology and network technology, computers are increasingly used in people's real lives and play an increasingly important role. Today, with the rapid advancement of our education, the more traditional paper-based examinations are outdated, because they not only require a lot of manpower and material resources to mark the test papers, but also to correct the test papers, which takes a lot of time. More importantly, In distance teaching and education, it is not conducive to arranging unified examinations and is destined to be eliminated by the times. In order to break the traditional examination model, for the development of the new situation, to free teachers from the heavy workload, and to adapt to the realization of truly paperless examinations, so that the examination can be conducted at any place without geographical restrictions, people are urgently demanding Use computer technology to implement online exams to reduce teachers' workload and improve work efficiency, improve the quality of exams, and make exams more notarized. Various applications based on the Internet are increasingly valued by people. The web-based online examination system emerged under this situation. It was born with the application development of network technology and database technology. It can use the network to conduct exams anytime and anywhere. Students taking exams are an extension of traditional exams: in addition, it can effectively use the resources of the campus network to better serve the school's teaching management.

In fact, there are already some online examination systems that have achieved this goal, such as Mandarin examinations, computer grade examinations, etc., which are all typical applications of online examination systems. However, most colleges and universities still use traditional examination methods. Therefore, this topic intends to design a simple online examination system based on the B/S model. The system is developed using Java, and MySQL is used as the database server in the background. It has a friendly interface and simple operation. Users can complete operations such as setting questions, taking exams, and automatically grading papers through an ordinary Web browser, which is simple and fast. By using this system, the efficiency of examinations can be greatly improved and the consumption of manpower, material and financial resources can be reduced.

1.3 Organizational structure of this article

The first chapter is the introduction. At the beginning of this article, there is a textual description of the topic selection background and topic selection background.

Chapter 2 studies the development technology and development tools used in the online examination system.

Chapter 3 is the system analysis part, including description of the overall system requirements, analysis of system requirements from a functional perspective, and non-functional analysis of whether the system can be implemented.

Chapter 4 is the system design part. The important part of this article provides the detailed design of the system architecture and the design instructions of some main functional modules.

Chapter 5 is the specific implementation of the system, introducing the specific implementation of each module of the system.

Chapter 6 builds on the previous chapters to test and run the system.

Finally, a careful summary of the system is given to provide a new outlook for the future.

2 System development environment  

2.1 J2EE technology

People can master many foreign languages, but most of what a computer scientist is proficient in is programming language, which is not a natural human language, such as C language, Java, Perl, etc. Since the "middleware" developed by different companies was not standardized enough, Sun launched J2EE and used this standard to solve the shortcomings. It provides a good mechanism that allows each level to allow corresponding servers and components to run, making the system stable and usable, efficient in development, and easy to maintain [1][2].

2.2MySQL database

The advancement of science and technology has brought many conveniences to daily life: classroom projectors use virtual imaging technology, and digital cameras use photoelectric detection technology. For example, the records of supermarket goods entering and leaving the warehouse require an information warehouse. This information warehouse is the database, and this logistics information management system also needs the support of this technology [7].

The software MySQL is used because it can accept access from multiple users, and Archive etc. exist in it. It will first classify the data and then save it in tables respectively. Such special operations will improve the speed of the data management system itself and allow the database to be used flexibly. MySQL's code is public and allows others to compile and upgrade it again. This feature can reduce user costs and form a good website system when paired with appropriate software. Although it has shortcomings, in all aspects, it is the mainstream application object of users [8].

2.3SSM framework introduction

The SSM (Spring+SpringMVC+MyBatis) framework set is integrated by the two open source frameworks Spring and MyBatis (SpringMVC is part of Spring). It is often used as a framework for web projects with relatively simple data sources.

 Spring
Spring is like a big factory that assembles beans in the entire project. In the configuration file, you can specify the use of specific parameters to call the constructor method of the entity class to instantiate the object. It can also be called the glue in the project.
The core idea of ​​Spring is IoC (Inversion of Control), which means that programmers no longer need to explicitly `new` an object, but let the Spring framework do it all for you.
 SpringMVC
SpringMVC intercepts user requests in the project. Its core Servlet, DispatcherServlet, assumes the responsibilities of intermediary or front desk, and matches user requests to Controller through HandlerMapping. Controller is the operation performed specifically corresponding to the request. SpringMVC is equivalent to struts in the SSH framework.
 mybatis
mybatis is an encapsulation of jdbc, which makes the underlying operations of the database transparent. The operations of mybatis are centered around a sqlSessionFactory instance. Mybatis is associated to the Mapper file of each entity class through the configuration file. The Mapper file is configured with the SQL statement mapping required for each class to the database. Every time you interact with the database, get a sqlSession through sqlSessionFactory, and then execute the sql command.

The page sends a request to the controller, the controller calls the business layer processing logic, the logic layer sends a request to the persistence layer, the persistence layer interacts with the database, and then returns the result to the business layer, the business layer sends the processing logic to the controller, and the controller then Call the view to display the data.

2.4B/S system working principle:

The B/S architecture adopts the working mode of browser request and server response.

Users can access text, data, pictures, animations, video on demand, sounds and other information generated by Web servers on the Internet through a browser;

Each Web server can be connected to the database server in various ways, and a large amount of data is actually stored in the database server;

Download the program from the Web server to the local for execution. If you encounter instructions related to the database during the download process, the Web server will hand it over to the database server for interpretation and execution, and return it to the Web server, and the Web server will return it to the user. In this structure, many networks are connected together to form a huge network, that is, the global network. Each enterprise can build its own Internet based on this structure.

In the B/S mode, the user requests access through the browser to many servers distributed on the network. The browser's request is processed by the server, and the processing results and corresponding information are returned to the browser. Other data All processing and requests are completed by the Web Server. Through this framework structure and the browser embedded inside the operating system, this structure has become the mainstream structure pattern of today's software applications.

3 System analysis

The so-called system analysis means that demand personnel obtain information through communication with users , and then display this information to users and developers in the form of demand specifications. In the long history of the development of software functions, for a long time, especially in the beginning, the importance of requirements analysis was not recognized by people. For example, at that time, the American company IBM developed an information management system for British Telecom. Development started without clarity, and the initial construction period was one year. Due to unclear requirements, the construction period was delayed by more than half a year, causing huge losses. This situation also exists in many of our software companies. They develop while developing, and even without clear communication with users , they directly copy the same type of projects and make changes. As a result, changes are made again when the system is accepted, resulting in a loss of manpower and material resources. A huge waste. The reason for all these consequences is that the demand acquisition is not timely, unclear, and incomplete.

3.1 Feasibility analysis

The main goal of the online examination system is to provide information management services related to online examinations, system users, material information, material types, examination messages, and resource management . After determining the goals, we conduct a feasibility analysis on whether the goals of this system can be achieved from the following four aspects.

3.1.1 Technical feasibility

The online examination system mainly uses the SSM framework , is based on the B/S structure, and the Mysql database. The development of the application requires complete functions, simple use, and the establishment of a database with complete, safe and stable data. The development technology based on the online examination system is highly feasible, and the developers have mastered certain development technologies, so the development of the system is feasible.

3.1.2 Operational feasibility

The login interface based on the online examination system is simple and easy to operate. It uses a common interface window to log in to the interface and access it through a computer. Members can access it as long as they have used a computer. The development of this system uses Java language and is based on B/S structure. These development environments make the system more complete. This system has the characteristics of easy operation, easy management, good interactivity, and is very simple in operation. Therefore this system can be developed.

3.1.3 Economic feasibility

The online examination system is based on the B/S model and uses the Mysql database to store data. The required hardware and software environments are easy to purchase on the market. Program development mainly involves the development and maintenance of the management system. Therefore, the program does not require high development manpower and financial resources, and the system is not very complex, the development cycle is short, and it has high economic feasibility.

3.1.4 Legal feasibility

The online examination system is a self-designed management system and has great practical significance. Because both the software and the database use open source code, the development and design of this system does not have problems such as infringement and is completely legally feasible.

In summary, an online examination system is technically, economically, operationally and legally feasible, and it is feasible to develop this program.

3.2 System process analysis

3.2.1 System development process

When developing an online examination system , first conduct a demand analysis, and then conduct an overall design plan for the system, design system functional modules, database selection, etc. The development process of this system is shown in Figure 3-1.

Figure 3-1 System development flow chart

3.2.2 User login process

In order to ensure the security of the system, if you want to use this system to manage system information, you must first log in to the system. As shown in Figure 3-2.

Figure 3-2 Login flow chart

3.2.3 System operation process

After the user opens and enters the system, the login interface will be displayed first, and the correct user name and password will be entered. The system will automatically detect the information. If the information is correct, the user will enter the system function interface and perform operations. Otherwise, an error will be displayed and the user cannot log in. Operation process As shown in Figure 3-3.

Figure 3-3 System operation flow chart

3.2.4 Add information process

Administrators can add information about online exams, system users, material information, material types, and test messages . Users can add information within their own authority. After entering information, the system will verify the entered information and data on its own. If the information If it is correct, it will be added to the database. If the information is incorrect, you will be prompted to re-enter the information. The process of adding information is shown in Figure 3-4.

Figure 3-4 Add information flow chart

3.2.5 Modify information flow

Administrators can modify online exams, system users, material information, material types, and test messages . Users can modify information within their own authority. First, enter the modification information interface, enter the modification information data, and the system will judge and verify the data. , if the modified information is legal, the modification is successful and the information is updated to the database. If the information is illegal, the modification fails and needs to be re-entered. The modified information flow chart is shown in Figure 3-5.

Figure 3-5 Modify information flow chart

3.2.6 Information deletion process

Administrators can delete information about online exams , system users, data information, data types, and test messages . After selecting the information to be deleted, click the delete button, and the system will ask if you are sure. If you click OK, the system will delete it. Delete the selected information and delete the information in the database. The flow chart of deleting information is shown in Figure 3-6.

Figure 3-6 Deletion information flow chart

3.3 System use case analysis

3.3.1 Administrator use case diagram

The core user in the system is the system administrator . After the administrator logs in, he manages the backend system through the administrator menu. The main functions include: online examination, system users, data information, data types, test messages and other functions . The administrator use case is shown in Figure 3-7 .

Figure 3-7 Administrator use case diagram

The core user in the system is the examination user . After registering and logging in, the examination user manages the front-end system through the administrator menu . The main functions include: online examination, system announcements, news information, material information, examination messages and other functional examination user examples are shown in Figure 3-8 .

Figure 3-8 Exam  user use case diagram

4 System design

4.1 System Overview

After the system analysis, we begin to memorize system design. System design includes overall design and detailed design. The overall design is just a general design. After the overall design, we can divide some things of the system, such as files, documents, data, etc. And through the overall design, we can roughly divide the modules and functions of the program. But it is only a preliminary classification and has no real implementation.

The overall design is just a preliminary design. Moreover, for a project, we can carry out multiple overall designs. Through comparison, including performance comparison, cost comparison, and benefit comparison, we can finally determine an optimal design plan and choose the best one. The overall design can reduce development costs and increase company benefits. From this point of view, the overall design is still very important.

The working principle diagram of the online examination system is shown in Figure 4-1:

Figure 4-1 System working principle diagram

4.2 System structure design

The system architecture diagram belongs to the system design stage. The system architecture diagram is only a product of this stage. The overall architecture of the system determines the model of the entire system and is the foundation of the system. The overall structural design of the online examination system is shown in Figure 4-2.

Figure 4-2 System structure diagram

4.3 Database design

Database is the basis of computer information system. At present, the key and core part of the computer system is the database. The quality of database development has a direct impact on the quality and speed of the entire system.

4.3.1 Database design principles

The conceptual structure design of the database adopts the entity-relationship (ER) model design method. The constituent elements of the ER model method are: entities, attributes, and relationships. The ER model is represented by an ER diagram, which reminds the user of things involved in the work environment, and attributes are descriptions of entity characteristics. The database plays a decisive factor in system design. The entity-relationship diagram of these key entities is designed below .

4.3.2 Database entities

Entities in the data model, also called instances, correspond to "events" or "things" that can be distinguished from other objects in the real world.

The ER diagram of this system is shown below:

1. The data information entity diagram is shown in Figure 4-3:

Figure 4-3 Data information entity diagram

2. The examination user entity diagram is shown in Figure 4-4:

Figure 4-4 Exam user entity diagram

3. The physical diagram of the examination message is shown in Figure 4-5 :

Figure 4-5 Exam message entity diagram

4.3.3 Database table design

Table comment (comment)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

comment_id

int

10

0

N

Y

Comment ID:

2

user_id

int

10

0

N

N

0

Commenter ID:

3

reply_to_id

int

10

0

N

N

0

Reply comment ID: empty is 0

4

content

longtext

2147483647

0

Y

N

content:

5

nickname

varchar

255

0

Y

N

Nick name:

6

avatar

varchar

255

0

Y

N

Avatar address: [0,255]

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

9

source_table

varchar

255

0

Y

N

Source table:

10

source_field

varchar

255

0

Y

N

Source field:

11

source_id

int

10

0

N

N

0

Source ID:

Table data_type (data type)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

data_type_id

int

10

0

N

Y

Data type ID

2

data_type

varchar

64

0

Y

N

Data type

3

recommend

int

10

0

N

N

0

Intelligent Recommendation

4

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

5

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table exam (exam)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

exam_id

mediumint

8

0

N

Y

exam id

2

name

varchar

32

0

N

N

Exam name: [2,32]

3

duration

int

10

0

Y

N

Answer time

4

score

double

9

2

Y

N

total score

5

status

varchar

10

0

Y

N

Status: enabled, disabled

6

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

7

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

Table exam_message (exam message)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

exam_message_id

int

10

0

N

Y

Exam message ID

2

candidate_users

int

10

0

Y

N

0

Candidate User

3

candidate_name

varchar

64

0

Y

N

Candidate name

4

message_content

text

65535

0

Y

N

Message content

5

message_date

date

10

0

Y

N

Message date

6

examine_state

varchar

16

0

N

N

Not reviewed

Approval Status

7

examine_reply

varchar

16

0

Y

N

moderation reply

8

recommend

int

10

0

N

N

0

Intelligent Recommendation

9

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

10

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table exam_question (exam question)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

exam_question_id

mediumint

8

0

N

Y

2

type

varchar

20

0

Y

N

type

3

title

varchar

255

0

Y

N

topic

4

question_item

varchar

500

0

Y

N

Options

5

answer

varchar

500

0

Y

N

Reference answer

6

score

double

9

2

Y

N

total score

7

question_order

int

10

0

Y

N

sort

8

exam_id

mediumint

7

0

Y

N

The test paper

9

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

10

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

表exam_users (考试用户)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

exam_users_id

int

10

0

N

Y

考试用户ID

2

candidate_name

varchar

64

0

Y

N

考生姓名

3

candidate_gender

varchar

64

0

Y

N

考生性别

4

examination_qualification

varchar

255

0

Y

N

考试资格

5

examine_state

varchar

16

0

N

N

未审核

审核状态

6

recommend

int

10

0

N

N

0

智能推荐

7

user_id

int

10

0

N

N

0

用户ID

8

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表hits (用户点击)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

hits_id

int

10

0

N

Y

点赞ID:

2

user_id

int

10

0

N

N

0

点赞人:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

表information (资料信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

information_id

int

10

0

N

Y

资料信息ID

2

data_name

varchar

64

0

Y

N

资料名称

3

cover

varchar

255

0

Y

N

封面

4

data_type

varchar

64

0

Y

N

资料类型

5

data_label

varchar

64

0

Y

N

资料标签

6

data_attachment

varchar

255

0

Y

N

资料附件

7

details

longtext

2147483647

0

Y

N

详情介绍

8

recommend

int

10

0

N

N

0

智能推荐

9

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

10

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表notice (公告)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

notice_id

mediumint

8

0

N

Y

公告id:

2

title

varchar

125

0

N

N

标题:

3

content

longtext

2147483647

0

Y

N

正文:

4

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

5

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表praise (点赞)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

praise_id

int

10

0

N

Y

点赞ID:

2

user_id

int

10

0

N

N

0

点赞人:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

8

status

bit

1

0

N

N

1

点赞状态:1为点赞,0已取消

表slides (轮播图)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

slides_id

int

10

0

N

Y

轮播图ID:

2

title

varchar

64

0

Y

N

标题:

3

content

varchar

255

0

Y

N

内容:

4

url

varchar

255

0

Y

N

链接:

5

img

varchar

255

0

Y

N

轮播图:

6

hits

int

10

0

N

N

0

点击量:

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表upload (文件上传)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

upload_id

int

10

0

N

Y

上传ID

2

name

varchar

64

0

Y

N

文件名

3

path

varchar

255

0

Y

N

访问路径

4

file

varchar

255

0

Y

N

文件路径

5

display

varchar

255

0

Y

N

显示顺序

6

father_id

int

10

0

Y

N

0

父级ID

7

dir

varchar

255

0

Y

N

文件夹

8

type

varchar

32

0

Y

N

文件类型

表user (用户账户:用于保存用户登录信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

user_id

mediumint

8

0

N

Y

用户ID:[0,8388607]用户获取其他与用户相关的数据

2

state

smallint

5

0

N

N

1

账户状态:[0,10](1可用|2异常|3已冻结|4已注销)

3

user_group

varchar

32

0

Y

N

所在用户组:[0,32767]决定用户身份和权限

4

login_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

上次登录时间:

5

phone

varchar

11

0

Y

N

手机号码:[0,11]用户的手机号码,用于找回密码时或登录时

6

phone_state

smallint

5

0

N

N

0

手机认证:[0,1](0未认证|1审核中|2已认证)

7

username

varchar

16

0

N

N

用户名:[0,16]用户登录时所用的账户名称

8

nickname

varchar

16

0

Y

N

昵称:[0,16]

9

password

varchar

64

0

N

N

密码:[0,32]用户登录所需的密码,由6-16位数字或英文组成

10

email

varchar

64

0

Y

N

邮箱:[0,64]用户的邮箱,用于找回密码时或登录时

11

email_state

smallint

5

0

N

N

0

邮箱认证:[0,1](0未认证|1审核中|2已认证)

12

avatar

varchar

255

0

Y

N

头像地址:[0,255]

13

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

表user_answer (用户答题)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

user_answer_id

mediumint

8

0

N

Y

2

user_id

mediumint

7

0

N

N

用户ID:[0,8388607]用户获取其他与用户相关的数据

3

exam_id

mediumint

7

0

N

N

0

考试id

4

score

double

9

2

Y

N

0.00

分数

5

answers

text

65535

0

Y

N

答案

6

score_detail

text

65535

0

Y

N

评分详情

7

objective_score

double

9

2

Y

N

0.00

客观题得分

8

subjective_score

double

9

2

Y

N

0.00

主观题得分

9

score_state

tinyint

4

0

Y

N

0

评分状态

10

nickname

varchar

255

0

Y

N

提交人

11

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

12

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表user_group (用户组:用于用户前端身份和鉴权)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

group_id

mediumint

8

0

N

Y

用户组ID:[0,8388607]

2

display

smallint

5

0

N

N

100

显示顺序:[0,1000]

3

name

varchar

16

0

N

N

名称:[0,16]

4

description

varchar

255

0

Y

N

描述:[0,255]描述该用户组的特点或权限范围

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

8

register

smallint

5

0

Y

N

0

注册位置:

9

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

10

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

5统详细设计

5.1登录模块的实现

将首页的左边的功能设计为用户登录的位置,所以在进行登录的地方就会显示首页。在登录后就是大众较为熟悉的位置,也就是让用户进行账号以及密码输入的样式。

当用户输入完信息并点击登录按钮时,Struts就会将用户输入的信息传递进表单并装入相应的对象之中,然后再转到相应位置进行校验。若用户名和密码框都是空的,那么系统就会不可将账号密码均设置为空值。

系统的底层设置要求账号密码不可以都是空值,将这些信息传递给相关的类中的对象方法并调用相关的信息,对于用户输入的数据进行检验。若检验结果正确会自动转到系统首页欢迎页面,如果不正确系统就会返回用户登录界面。

用户登录流程图如下所示。

5-1 用户登录流程

登录界面如下图所示。

图5-2登录界面图

登录关键代码如下所示。

/**

     * 登录

     * @param data

     * @param httpServletRequest

     * @return

     */

    @PostMapping("login")

    public Map<String, Object> login(@RequestBody Map<String, String> data, HttpServletRequest httpServletRequest) {

        log.info("[执行登录接口]");

        String username = data.get("username");

        String email = data.get("email");

        String phone = data.get("phone");

        String password = data.get("password");

        List resultList = null;

        QueryWrapper wrapper = new QueryWrapper<User>();

        Map<String, String> map = new HashMap<>();

        if(username != null && "".equals(username) == false){

            map.put("username", username);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }

        else if(email != null && "".equals(email) == false){

            map.put("email", email);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }

        else if(phone != null && "".equals(phone) == false){

            map.put("phone", phone);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }else{

            return error(30000, "账号或密码不能为空");

        }

        if (resultList == null || password == null) {

            return error(30000, "账号或密码不能为空");

        }

        //判断是否有这个用户

        if (resultList.size()<=0){

            return error(30000,"用户不存在");

        }

        User byUsername = (User) resultList.get(0);

        Map<String, String> groupMap = new HashMap<>();

        groupMap.put("name",byUsername.getUserGroup());

        List groupList = userGroupService.selectBaseList(userGroupService.select(groupMap, new HashMap<>()));

        if (groupList.size()<1){

            return error(30000,"用户组不存在");

        }

        UserGroup userGroup = (UserGroup) groupList.get(0);

        //查询用户审核状态

        if (!StringUtils.isEmpty(userGroup.getSourceTable())){

            String res = service.selectExamineState(userGroup.getSourceTable(),byUsername.getUserId());

            if (res==null){

                return error(30000,"用户不存在");

            }

            if (!res.equals("已通过")){

                return error(30000,"该用户审核未通过");

            }

        }

        //查询用户状态

        if (byUsername.getState()!=1){

            return error(30000,"用户非可用状态,不能登录");

        }

        String md5password = service.encryption(password);

        if (byUsername.getPassword().equals(md5password)) {

            // 存储Token到数据库

            AccessToken accessToken = new AccessToken();

            accessToken.setToken(UUID.randomUUID().toString().replaceAll("-", ""));

            accessToken.setUser_id(byUsername.getUserId());

            tokenService.save(accessToken);

            // 返回用户信息

            JSONObject user = JSONObject.parseObject(JSONObject.toJSONString(byUsername));

            user.put("token", accessToken.getToken());

            JSONObject ret = new JSONObject();

            ret.put("obj",user);

            return success(ret);

        } else {

            return error(30000, "账号或密码不正确");

        }

}

    public String select(Map<String,String> query,Map<String,String> config){

        StringBuffer sql = new StringBuffer("select ");

        sql.append(config.get(FindConfig.FIELD) == null || "".equals(config.get(FindConfig.FIELD)) ? "*" : config.get(FindConfig.FIELD)).append(" ");

        sql.append("from ").append("`").append(table).append("`").append(toWhereSql(query, "0".equals(config.get(FindConfig.LIKE))));

        if (config.get(FindConfig.GROUP_BY) != null && !"".equals(config.get(FindConfig.GROUP_BY))){

            sql.append("group by ").append(config.get(FindConfig.GROUP_BY)).append(" ");

        }

        if (config.get(FindConfig.ORDER_BY) != null && !"".equals(config.get(FindConfig.ORDER_BY))){

            sql.append("order by ").append(config.get(FindConfig.ORDER_BY)).append(" ");

        }

        if (config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE))){

            int page = config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE)) ? Integer.parseInt(config.get(FindConfig.PAGE)) : 1;

            int limit = config.get(FindConfig.SIZE) != null && !"".equals(config.get(FindConfig.SIZE)) ? Integer.parseInt(config.get(FindConfig.SIZE)) : 10;

            sql.append(" limit ").append( (page-1)*limit ).append(" , ").append(limit);

        }

        log.info("[{}] - 查询操作,sql: {}",table,sql);

        return sql.toString();

}

    public List selectBaseList(String select) {

        List<Map<String,Object>> mapList = baseMapper.selectBaseList(select);

        List<E> list = new ArrayList<>();

        for (Map<String,Object> map:mapList) {

            list.add(JSON.parseObject(JSON.toJSONString(map),eClass));

        }

        return list;

}

  

 5.2注册模块的实现

系统的用户通过自行注册生成,在系统首页点击用户注册菜单,系统跳转到对应的注册页面。点击重置按钮,清空所填数据,点击注册按钮完成注册。

用户注册流程图如下所示。

图5-1 用户注册流程图

用户注册界面如下图所示。

图5-4注册界面

注册关键代码如下所示。

/**

     * 注册

     * @return

     */

    @PostMapping("register")

    public Map<String, Object> signUp(HttpServletRequest request) throws IOException {

        // 查询用户

        Map<String, String> query = new HashMap<>();

        Map<String,Object> map = service.readBody(request.getReader());

        query.put("username",String.valueOf(map.get("username")));

        List list = service.selectBaseList(service.select(query, new HashMap<>()));

        if (list.size()>0){

            return error(30000, "用户已存在");

        }

        map.put("password",service.encryption(String.valueOf(map.get("password"))));

        service.insert(map);

        return success(1);

}

    public Map<String,Object> readBody(BufferedReader reader){

        BufferedReader br = null;

        StringBuilder sb = new StringBuilder("");

        try{

            br = reader;

            String str;

            while ((str = br.readLine()) != null){

                sb.append(str);

            }

            br.close();

            String json = sb.toString();

            return JSONObject.parseObject(json, Map.class);

        }catch (IOException e){

            e.printStackTrace();

        }finally{

            if (null != br){

                try{

                    br.close();

                }catch (IOException e){

                    e.printStackTrace();

                }

            }

        }

        return null;

    }

    public void insert(Map<String,Object> body){

        E entity = JSON.parseObject(JSON.toJSONString(body),eClass);

        baseMapper.insert(entity);

        log.info("[{}] - 插入操作:{}",entity);

}

5.3资料信息收藏模块的实现

用户选择相应的资料信息收藏,通过id传参,找到id为此传参的资料信息,在收藏页提交收藏记录表单,生成收藏记录,用户在个人中心管理个人的收藏夹。

资料信息收藏界面如下图所示。

图5-6 资料信息收藏模块界面图

5.4评论模块的实现

用户点击某个资料信息进入资料详细页,点击评论按钮进入评论页,提交评论信息,成功发布评论,管理员管理用户的评论信息。

发布评论流程图如下所示。

图5-1 发布评论流程图

发布评论界面如图所示。

图5-8发布评论界面

5.5考试留言模块的实现

用户执行考试留言,并可以操作相关内容,例如查看,编辑。考试留言的添加操作是建立在资料类型信息的列表基础上,单击查资料类型信息下的考试留言链接;然后单击“考试留言”进行添加,添加成功后的信息会载入到考试留言查询列表中。

考试留言流程图如下所示。

图5-9 考试留言流程图

考试留言界面如图所示。

图5-9考试留言界面

考试留言逻辑代码如下所示。

  @RequestMapping("/get_obj")

    public Map<String, Object> obj(HttpServletRequest request) {

        List resultList = service.selectBaseList(service.select(service.readQuery(request), service.readConfig(request)));

        if (resultList.size() > 0) {

            JSONObject jsonObject = new JSONObject();

            jsonObject.put("obj",resultList.get(0));

            return success(jsonObject);

        } else {

            return success(null);

        }

}

5.6密码修改模块的实现

用户使用该网上考试系统注册完成后,用户对登录密码有修改需求时,系统也可以提供用户修改密码权限。系统中所有的操作者能够变更自己的密码信息,执行该功能首先必须要登入系统,然后选择密码变更选项以后在给定的文本框中填写初始密码和新密码来完成修改密码的操作。在填写的时候,假如两次密码填写存在差异,那么此次密码变更操作失败,下面的图片展示的就是该板块对应的工作面。

密码修改流程图如下所示。

图5-9 密码修改流程图

密码修改界面如图所示。

图5-10密码修改界面图

5.7系统公告模块的实现

管理员执行系统公告管理,并可以操作相关内容,例如添加,查看,编辑和删除。通过单击“添加系统公告”,可以通过系统公告添加界面添加详细信息并添加系统公告注释。单击查看字段级别链接以查看有关所选字段级别的信息。然后单击“提交”跳转重返到添加页面。添加成功后的信息会载入到系统公告查询列表中,管理员可进行编辑以及修改。

系统公告管理流程如下图所示。

图5-11 系统公告管理流程

系统公告界面如下图所示。

图5-12 系统公告界面

系统公告模块的实现如下图所示。

图5-13系统公告模块的实现

系统公告管理关键代码如下所示。

@RequestMapping(value = "/del")

    @Transactional

    public Map<String, Object> del(HttpServletRequest request) {

        service.delete(service.readQuery(request), service.readConfig(request));

        return success(1);

}

5.8用户管理模块的实现

用户通过注册了方可获得登录使用权限,此时选择注册用户选项,系统就会自动转到用户注册工作面,在注册该部分信息时系统会自动调用add函数,然后在给定的文本框中填写有关该用户的基础信息后选择确认即可完成注册。检索用户信息,在新增用户信息以后,在检索工具栏中填写对应的用户信息,系统就会将该用户有关的所有信息展示出来。

用户管理流程图如下所示。

图5-14 用户管理流程图

用户管理界面如下图所示。

图5-15 用户管理界面

用户管理逻辑代码如下所示。

@PostMapping("/add")

    @Transactional

    public Map<String, Object> add(HttpServletRequest request) throws IOException {

        Map<String,Object> paramMap = service.readBody(request.getReader());

        this.addMap(paramMap);

        return success(1);

}

    @Transactional

    public Map<String, Object> addMap(Map<String,Object> map){

        service.insert(map);

        return success(1);

}

5.9资料类型管理模块的实现

管理员执行资料类型管理,并可以操作相关内容,例如添加,查看,编辑和删除。通过单击“添加资料类型”,可以通过资料类型添加界面添加详细信息。单击查看字段级别链接以查看有关所选字段级别的信息。然后单击“提交”跳转重返到添加页面。添加成功后的信息会载入到资料类型查询列表中,管理员可进行编辑以及修改。

资料类型添加流程图如下所示。

图5-15 资料类型添加流程图

资料类型管理如下图所示。

图5-15 资料类型管理界面

6系统测试

系统开发的最后一个步骤就是系统测试,系统测试也是整个系统十分重要的一个环节,测试的好坏关系到产品的发展。用户对软件的质量、性能和可靠性等需求就要通过测试来实现。测试过程要必须遵循严谨性、完善性、规范性的原则,测试的主要目的就是看看在系统运行中,是否会出现bug,然后对出现的bug进行调试,直到程序完美运行。但是软件的测试只能尽可能的减少bug,理论上来说是无法达到消除bug。但是bug越少,系统出错的几率就越低,用户使用起来也更方便、更安全。

近年来,软件包含测试从现在的检验当中来看,系统接近预期目标可能出现的问题,并对这些错误做出相应的修正,假如我们不进行早期的测试错误就会延续下去,最后所做出的成品就会有很大的困难。

我们要在这个测试的过程当中找出错误。测试成软件开发的主要一部分,自从有了程序的设计那天开始,它就成为了重要的组成部分。经过统计来看,软件测试可以占据这个系统45%的工作量,而在软件开发的成本当中,对于测试成本来说它包含了很多的测试工作。每个程序测试时都会出现和遇到错误。在整个程序的开发过程当中,人为去查找错误是非常复杂和困难的,所以我们一般都会找一些测试的工具来进行测试

6.1系统测试的意义

随着现代信息的快速发展,在社会各大领域中已经都开始应用网络信息技术,在应用网络技术的同时人们也开始把软件的质量问题作为了一个重要焦点来关注,因为一个软件的好与坏它决定着这个系统在市场上的生存,所以我们必须要把软件质量来做好,这样才有一定的生存能力。对于用户来说它们首先选用的都是保证这个系统软件的质量问题,因为一个系统的软件质量决定着用户在后期上成本经济的问题。

6.2 测试方法

具体测试方法包括:黑盒测试和白盒测试。

黑盒测试又被人们称作为功能测试,通常是在程序的接口来做一些测试的方法,它一般包括对程序的功能和使用的方法来做出一些数据的接受和输出,同时还可以做出正确的输出信息,并保证与外部信息的完整性。

白盒测试通常被人们称作为结构测试,在整个程序的结构和处理当中它是由程序当中的逻辑测试和检验程序来完成一些正确的工作。

具体的功能测试它是包括:系统的适用性、准确性、安全性等功能测试。

6.3测试分析

基于网上考试系统满足相关信息的管理需求,在设计时借鉴了国内外优秀网站的优点,从界面到系统设计都保证了管理员以及用户能够方便操作。系统的主要特点和优点归纳如下:

(1)本系统用的移置性和针对性都比较高,因为针对性高可以提供更好的服务而移置性可以在多个系统上运行,更给用户带来了极大的方便。

(2)该基于网上考试系统内容全面,管理方便可以及时的全面的处理各种错误,异常,这样避免了很多因用户的马虎操作而出现的失误,其操作方便,用户界面友好,能够上网的人都可以很好的进行操作。

经过对上述的测试结果分析,所有基本功能齐全,操作简单,系统运行性能良好,系统安全可靠,能促进基于网上考试系统的发展,发展前景广阔。

结    论

本系统通过对java和Mysql数据库的简介,从硬件和软件两反面说明了基于网上考试系统的可行性,本文结论及研究成果如下:实现了java与Mysql相结合构建的基于网上考试系统,网站可以响应式展示。通过本次基于网上考试系统的研究与实现,我感到学海无涯,学习是没有终点的,而且实践出真知,只有多动手才能尽快掌握它,经验对系统的开发非常重要,经验不足,就难免会有许多考虑不周之处。比如要有美观的界面,更完善的功能,才能吸引更多的用户

由于在此之前对于java知识没有深入了解,所以从一开始就碰到许多困难,例如一开始的页面显示不规范、数据库连接有问题已经无法实现参数的传递等等,不过通过在网上寻找有关资料以及同学的帮助下最后都得到了解决,在此过程中,我不仅学到了很多知识,也提高了自己解决问题的能力,尤其是学会如何从大量的信息中筛选出所需有用的信息,同时我更加深刻的体会到了,虽然书本上的大部分知识都是有价值,正确的,但实际上每个人编程的思路和对数据处理的方法、思想都是不同的,这就要求我们一定要通过实践才能找到解决问题的方案。在此次毕业设计活动中,我不断的提高了自己,也得到了宝贵的经验,我相信这些对我以后的发展都会有很大帮助。

通过这次基于网上考试系统的开发,我参考了很多相关系统的例子,取长补短,吸取了其他系统的长处,逐步对该系统进行了完善,但是该系统还是有很多的不足之处,有待以后进一步学习。

实践证明,基于网上考试系统有着非常好的发展前景,经过测试运行,系统各项功能都十分完善,界面漂亮,使用方便,操作容易,在技术理论上已经成熟。

致    谢

大学的学习生活在这个季节将结束,但是在我的生命这仅仅只是一个逗号,我将面对的旅程的另一个的开始。通过这次毕业设计的整个开发过程,从需求分析到具体功能实现,再到最终测试和维护的理解有了很大的进步,让我对系统开发有了更深刻的认识,对我个人的实践能力和解决问题的能力,都有了很大的帮助。这是这次毕业设计最大的收获。

首先要感谢我的指导老师,他在论文写作上,给予了我各种无私的帮助,治学严谨,严格要求,使我获得了很大的收获。老师深厚的理论知识和丰富的实践经验,都深深的影响到我,在这方面,我谨表示衷心的感谢。

其次,我还要对所有的老师和同学表示感谢,他们在我学习的过程中,都积极的提供了很多帮助,无论是专业知识,还是实践操作技能,也能够让我在论文写作中,遇到的一些难题迎刃而解。

最后,对阅读和评审本论文的各位老师表示衷心的感谢!

参考文献 

[1]伍德鹏,李佩学.基于SSM框架的高职院校教学办公用品管理信息系统设计研究[J].轻工科技,2023,39(01):99-101.

[2]李亚君. 基于SSM框架的B2C电子商城系统的设计与实现[D].合肥工业大学,2022.DOI:10.27101/d.cnki.ghfgu.2022.000313.

[3]Jun Luo1,Pengcheng Cao2,Cheng Chen3. Automatic Test Paper Generation Online Examination System Based on Test Site Knowledge Map[J]. Computer Informatization and Mechanical System,2022,5(4).

[4]梁倩,文建平. 一种基于SSM框架的云笔记系统[P]. 天津市:CN115248676A,2022-10-28.

[5]曹泽翰.基于SSM框架的流体力学课程虚拟仿真实验平台设计[J].信息与电脑(理论版),2022,34(20):34-36.

[6]刘洪付,韩坤,王亮,刘栋,秦国民. 一种基于网络题库的线上考试和网上阅卷智能化管理系统[P]. 山东省:CN114693091A,2022-07-01.

[7]Li Qiuyan. Research on the Application of English Course Online Examination System Based on Face Recognition Technology[J]. Journal of Physics: Conference Series,2021,1738(1).

[8]李思怡.基于ASP.NET的网上考试系统的开发与实现[J].黄河科技学院学报,2019,21(05):73-80.DOI:10.19576/j.issn.1008-5424.2019.05.019.

[9]原莉.C语言教学网站及网上考试系统的设计与实现[J].计算机产品与流通,2019(07):235.

[10]乔俊玲.基于Struts+Hibernate+Ajax框架开发网上考试系统的设计与实现[J].电脑知识与技术,2019,15(08):61-62.DOI:10.14004/j.cnki.ckt.2019.0736.

[11], 人事管理 人事考试考务管理系统和网上报名平台上线运行. 吴海英 主编,江阴年鉴,方志出版社,2018,123,年鉴.

[12]方春露,杨文琦,陈滔等. 基于Javaweb技术广东省学生体质争优运动处方数据库和视频库的构建[C]//中国生理学会运动生理学专业委员会,北京体育大学.2018年中国生理学会运动生理学专业委员会会议暨“科技创新与运动生理学”学术研讨会论文集.2018年中国生理学会运动生理学专业委员会会议暨“科技创新与运动生理学”学术研讨会论文集,2018:161-162.

[13]李晓丽,赵丽辉.基于ASP计算机应用基础课程网上考试系统设计[J].电子技术与软件工程,2017(18):185.

[14]马浩淼.党校网上考试系统的设计与实现[J].电脑知识与技术,2017,13(06):53-55.DOI:10.14004/j.cnki.ckt.2017.0470.

[15]邱琳.网上考试系统开发及设计方式研究[J].科技创新导报,2017,14(03):121+123.DOI:10.16660/j.cnki.1674-098X.2017.03.121.

[16]宫大川. 电子商务师网上考试系统[D].吉林大学,2016.

请关注点赞+私信博主,免费领取项目源码

Guess you like

Origin blog.csdn.net/ID3461074420/article/details/132790850