基于web的ssm网络在线考试系统源码和论文

摘要

随着Internet的发展,人们的日常生活已经离不开网络。未来人们的生活与工作将变得越来越数字化,网络化和电子化。网上管理,它将是直接管理网络在线考试系统的最新形式。本论文是以构建网络在线考试系统为目标,使用 java技术制作,由管理员和学生两大部分组成。着重论述了系统设计分析,系统主要包括首页、个人中心、学生管理、在线考试管理、试题管理、系统管理、考试管理等功能,以及后台数据库管理。从网站设计到详细实现都根据了网站的建设思想和mysql数据库的设计方法。

该系统的应用可以减少工作人员的劳动强度,提高工作效率与管理水平,具有很大的价值。它可以使网络在线考试系统操作简单,成功率高,使网络在线考试系统的管理向一个更高层次前进。

本系统尝试使用ssm在网上架构一个动态的网络在线考试系统,以使每一用户在家就能通过系统来进行在线考试管理。

基于web的ssm网络在线考试系统源码和论文739

关键词:网络在线考试; java技术;mysql数据库  

演示视频:

基于web的ssm网络在线考试系统源码和论文

Abstract

With the development of Internet, People's Daily life has been inseparable from the Network. In the future, people's life and work will become more and more digital, network and electronic. Online management, it will be the latest form of directly administered online examination system. This paper is to build a network online examination system as the goal, using Java technology to make, by the administrator and students two parts. The system mainly includes home page, personal center, student management, online test management, test questions management, system management, test management and other functions, as well as background database management. From the website design to the detailed implementation are based on the website construction ideas and mysql database design method.

The application of the system can reduce the labor intensity of the staff, improve the work efficiency and management level, has great value. It can make the network online examination system simple operation, high success rate, make the network online examination system management to a higher level.

This system tries to use SSM to construct a dynamic network online examination system, so that each user can manage online examination through the system at home.

Key words: Online examination; Java technology; The mysql database

 

package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.XueshengEntity;
import com.entity.view.XueshengView;import com.service.XueshengService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 学生* 后端接口* @author * @email * @date 2022-03-25 09:59:45*/
@RestController
@RequestMapping("/xuesheng")
public class XueshengController {@Autowiredprivate XueshengService xueshengService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {XueshengEntity user = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", username));if(user==null || !user.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(), username,"xuesheng",  "学生" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody XueshengEntity xuesheng){//ValidatorUtils.validateEntity(xuesheng);XueshengEntity user = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", xuesheng.getXueshengzhanghao()));if(user!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();xuesheng.setId(uId);xueshengService.insert(xuesheng);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");XueshengEntity user = xueshengService.selectById(id);return R.ok().put("data", user);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){XueshengEntity user = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", username));if(user==null) {return R.error("账号不存在");}user.setMima("123456");xueshengService.updateById(user);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,XueshengEntity xuesheng, HttpServletRequest request){EntityWrapper<XueshengEntity> ew = new EntityWrapper<XueshengEntity>();PageUtils page = xueshengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuesheng), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,XueshengEntity xuesheng, HttpServletRequest request){EntityWrapper<XueshengEntity> ew = new EntityWrapper<XueshengEntity>();PageUtils page = xueshengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuesheng), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( XueshengEntity xuesheng){EntityWrapper<XueshengEntity> ew = new EntityWrapper<XueshengEntity>();ew.allEq(MPUtil.allEQMapPre( xuesheng, "xuesheng")); return R.ok().put("data", xueshengService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(XueshengEntity xuesheng){EntityWrapper< XueshengEntity> ew = new EntityWrapper< XueshengEntity>();ew.allEq(MPUtil.allEQMapPre( xuesheng, "xuesheng")); XueshengView xueshengView =  xueshengService.selectView(ew);return R.ok("查询学生成功").put("data", xueshengView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){XueshengEntity xuesheng = xueshengService.selectById(id);return R.ok().put("data", xuesheng);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){XueshengEntity xuesheng = xueshengService.selectById(id);return R.ok().put("data", xuesheng);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody XueshengEntity xuesheng, HttpServletRequest request){xuesheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(xuesheng);XueshengEntity user = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", xuesheng.getXueshengzhanghao()));if(user!=null) {return R.error("用户已存在");}xuesheng.setId(new Date().getTime());xueshengService.insert(xuesheng);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody XueshengEntity xuesheng, HttpServletRequest request){xuesheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(xuesheng);XueshengEntity user = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", xuesheng.getXueshengzhanghao()));if(user!=null) {return R.error("用户已存在");}xuesheng.setId(new Date().getTime());xueshengService.insert(xuesheng);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody XueshengEntity xuesheng, HttpServletRequest request){//ValidatorUtils.validateEntity(xuesheng);xueshengService.updateById(xuesheng);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){xueshengService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<XueshengEntity> wrapper = new EntityWrapper<XueshengEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = xueshengService.selectCount(wrapper);return R.ok().put("count", count);}}
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.ExampaperEntity;
import com.entity.view.ExampaperView;import com.service.ExampaperService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 在线考试表* 后端接口* @author * @email * @date 2022-03-25 09:59:45*/
@RestController
@RequestMapping("/exampaper")
public class ExampaperController {@Autowiredprivate ExampaperService exampaperService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,ExampaperEntity exampaper, HttpServletRequest request){EntityWrapper<ExampaperEntity> ew = new EntityWrapper<ExampaperEntity>();PageUtils page = exampaperService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, exampaper), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,ExampaperEntity exampaper, HttpServletRequest request){EntityWrapper<ExampaperEntity> ew = new EntityWrapper<ExampaperEntity>();PageUtils page = exampaperService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, exampaper), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( ExampaperEntity exampaper){EntityWrapper<ExampaperEntity> ew = new EntityWrapper<ExampaperEntity>();ew.allEq(MPUtil.allEQMapPre( exampaper, "exampaper")); return R.ok().put("data", exampaperService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(ExampaperEntity exampaper){EntityWrapper< ExampaperEntity> ew = new EntityWrapper< ExampaperEntity>();ew.allEq(MPUtil.allEQMapPre( exampaper, "exampaper")); ExampaperView exampaperView =  exampaperService.selectView(ew);return R.ok("查询在线考试表成功").put("data", exampaperView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){ExampaperEntity exampaper = exampaperService.selectById(id);return R.ok().put("data", exampaper);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){ExampaperEntity exampaper = exampaperService.selectById(id);return R.ok().put("data", exampaper);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody ExampaperEntity exampaper, HttpServletRequest request){exampaper.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(exampaper);exampaperService.insert(exampaper);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody ExampaperEntity exampaper, HttpServletRequest request){exampaper.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(exampaper);exampaperService.insert(exampaper);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody ExampaperEntity exampaper, HttpServletRequest request){//ValidatorUtils.validateEntity(exampaper);exampaperService.updateById(exampaper);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){exampaperService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<ExampaperEntity> wrapper = new EntityWrapper<ExampaperEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = exampaperService.selectCount(wrapper);return R.ok().put("count", count);}}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/200511.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

软件测试方法之等价类测试

01 等价类划分法 1、应用场合 有数据输入的地方&#xff0c;可以使用等价类划分法。 从大量数据中挑选少量代表数据进行测试。 2、测试思想 穷举测试&#xff1a;把所有可能的数据全部测试一遍叫穷举测试。穷举测试是最全面的测试&#xff0c;但是在实际工作中不能采用&am…

vue3安装markdown-it

记录一个坑 vue ts使用markdown-it需要使用以下命令安装才行 npm install --save markdown-it vue/compiler-sfc来源https://juejin.cn/s/vue3%20markdown-it

Android View.inflate 和 LayoutInflater.from(this).inflate的区别

前言 两个都是布局加载器&#xff0c;而View.inflate是对 LayoutInflater.from(context).inflate的封装&#xff0c;功能相同&#xff0c;案例使用了dataBinding。 View.inflate(context, layoutResId, root) LayoutInflater.from(context).inflate(layoutResId, root, fals…

C++包管理利器CPM

C包管理利器CPM 一、介绍 CPM.cmake is a cross-platform CMake script that adds dependency management capabilities to CMake. It’s built as a thin wrapper around CMake’s FetchContent module that adds version control, caching, a simple API and more. CPM.cma…

CENTOS 7 添加黑名单禁止IP访问服务器

一、通过 firewall 添加单个黑名单 只需要把ip添加到 /etc/hosts.deny 文件即可&#xff0c;格式 sshd:$IP:deny vim /etc/hosts.deny# 禁止访问sshd:*.*.*.*:deny# 允许的访问sshd:.*.*.*:allowsshd:.*.*.*:allow 二、多次失败登录即封掉IP&#xff0c;防止暴力破解的脚本…

IBM 刚刚发布了首个 1000 量子比特的量子芯片

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…

Python继承技法揭示,代码更具扩展性

更多Python学习内容&#xff1a;ipengtao.com 大家好&#xff0c;我是彭涛&#xff0c;今天为大家分享 Python继承技法揭示&#xff0c;代码更具扩展性&#xff0c;全文4000字&#xff0c;阅读大约11分钟。 继承是面向对象编程中的核心概念之一&#xff0c;它允许创建一个新的类…

spring 框架的 AOP

AOP依赖导入 <!-- AOP依赖--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-aop</artifactId></dependency>

Matlab 镜像变换(2D)

文章目录 一、简介二、实现代码三、实现效果参考资料一、简介 镜像变换是一个非常有趣的过程,它有着一个通用的套路(以2D为例):一个点围绕一个给定对称轴的镜像可以通过平移对称轴上一点,然后旋转它,使对称轴与x轴对齐,之后我们将旋转后的点的y坐标置为负,最后再将对称…

如何购买华为云服务器

华为云是华为推出的云计算服务平台&#xff0c;旨在为企业和个人提供全面的云端解决方案。它提供了包括计算、存储、数据库、人工智能、大数据、安全等多种云服务&#xff0c;覆盖了基础设施、平台和软件级别的需求。华为云致力于构建安全可信赖的云计算基础设施&#xff0c;以…

智慧校园:TSINGSEE青犀智能视频监控系统,AI助力优化校园管理

随着科技的飞速发展和信息化社会的到来&#xff0c;智慧校园已经成为教育领域的一种新型发展模式。智慧校园的需求和发展趋势日益显现&#xff0c;其建设已成为当今教育信息化发展的重要方向。 TSINGSEE青犀结合高可靠、高性能的云计算、人工智能、大数据、物联网等技术&#…

云原生周刊:K8s 的 YAML 技巧 | 2023.12.4

开源项目推荐 Helmfile Helmfile 是用于部署 Helm Chart 的声明性规范。其功能有&#xff1a; 保留图表值文件的目录并维护版本控制中的更改。将 CI/CD 应用于配置更改。定期同步以避免环境偏差。 Docketeer 一款 Docker 和 Kubernetes 开发人员工具&#xff0c;用于管理容…

【QT】Qt常用数值输入和显示控件

目录 1.QAbstractslider 1.1主要属性 2.QSlider 2.1专有属性 2.2 常用函数 3.QScrollBar 4.QProgressBar 5.QDial 6.QLCDNumber 7.上述控件应用示例 1.QAbstractslider 1.1主要属性 QSlider、QScrollBar和Qdial3个组件都从QAbstractSlider继承而来&#xff0c;有一些共有的属性…

三、DVP摄像头调试笔记(图片成像质量微调整,非ISP)

说明&#xff1a;当前调试仅仅用来测试和熟悉部分摄像头寄存器模式 一、图片成像方向控制&#xff0c;基本每个摄像头都会有上下左右翻转寄存器 正向图片 反向图片 二、设置成像数据成各种颜色&#xff0c;&#xff08;黑白/原彩/黄色等等&#xff09; 在寄存器书册描述中…

【面试经典150 | 二叉树】相同的树

文章目录 写在前面Tag题目来源题目解读解题思路方法一&#xff1a;递归方法二&#xff1a;迭代 写在最后 写在前面 本专栏专注于分析与讲解【面试经典150】算法&#xff0c;两到三天更新一篇文章&#xff0c;欢迎催更…… 专栏内容以分析题目为主&#xff0c;并附带一些对于本题…

UVa512追踪电子表格中的单元格题解

题目 有一个r行c列(1≤r,c≤50)的电子表格,行从上到下编号为1~r,列从左到右编号为 1~c。如图(a)所示,如果先删除第1、5行,然后删除第3,6,7,9列,结果如图(b)所示。 接下来在第2、3、5行前各插入一个空行,然后在第3列前插入一个空列, 会得到如图(e)的结果。 你的任务是模拟这样…

10.机器人系统仿真(urdf集成gazebo、rviz)

目录 1 机器人系统仿真的必要性与本篇学习目的 1.1 机器人系统仿真的必要性 1.2 一些概念 URDF是 Unified Robot Description Format 的首字母缩写&#xff0c;直译为统一(标准化)机器人描述格式&#xff0c;可以以一种 XML 的方式描述机器人的部分结构&#xff0c;比如底盘…

C++ 预处理详解

目录 预处理符号 #define #define定义标识符 #define定义宏 #define的替换规则 #与## 带副作用的宏参数 宏和函数的对比 undef 命令行定义 条件编译 文件包含 头文件被包含的方式 本地文件包含 库文件包含 嵌套文件包含 预处理符号 __FILE__ //进行编译的源…

有基础转Go语言学习笔记(2. 基本数据结构篇)

有基础转Go语言学习笔记&#xff08;2. 基本数据结构篇&#xff09; 1. 数组和切片&#xff08;Array & Slice&#xff09; 在Go语言中&#xff0c;数组&#xff08;Array&#xff09;和切片&#xff08;Slice&#xff09;是基础且常用的数据结构&#xff0c;它们有相似之…

adb和bat的局限性

ADB&#xff08;Android调试桥&#xff09;和BAT&#xff08;批处理文件&#xff09;都是非常有用的工具&#xff0c;但它们也各自存在一些局限性。 ADB的局限性包括&#xff1a; 设备兼容性&#xff1a;某些设备可能由于制造商定制的原因对ADB支持不完善。 需要USB连接&#…