Java毕业设计-基于Springboot框架的在线答疑系统项目实战(附源码+论文)

大家好!我是岛上程序猿,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:Java毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 安卓app毕业设计
🌎微信小程序毕业设计

开发环境

开发语言:Java
框架:springboot
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7
数据库工具:Navicat12
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器

演示视频

jspssm546Springboot在线答疑

源码下载地址:

https://download.csdn.net/download/m0_46388260/87987353

论文目录

【如需全文请按文末获取联系】

在这里插入图片描述
在这里插入图片描述

一、项目简介

本文从学生的功能要求出发,建立了在线答疑系统,系统中的功能模块主要是实现管理员权限;首页、个人中心、学生管理、教师管理、问题发布管理、疑难解答管理。教师权限:首页、个人中心、疑难解答管理、试卷管理、试题管理、考试管理。学生权限;首页、个人中心、问题发布管理、疑难解答管理、考试管理等功能部分;经过认真细致的研究,精心准备和规划,最后测试成功,系统可以正常使用。分析功能调整与在线答疑系统实现的实际需求相结合,讨论了java开发在线答疑系统的使用。

二、系统设计

2.1软件功能模块设计

在线答疑系统的设计主要是为了满足学生的实际需求。 因此,它需要通过Internet实现,因此它必须具备硬件和软件基础。该平台最终可以通过科学技术和各种方式达到支持智能化的信息管理的目的。因此,它必须具备网络在线答疑系统所需的环境和各种资料,并保证实现开放性,模块性和实用性三个原则。
在线答疑系统,主要包括管理员、教师、学生三个用户角色,对于学生角色不同,所使用的功能模块相应不同。
管理员权限;首页、个人中心、学生管理、教师管理、问题发布管理、疑难解答管理
教师权限:首页、个人中心、疑难解答管理、试卷管理、试题管理、考试管理。
学生权限;首页、个人中心、问题发布管理、疑难解答管理、考试管理等功能模块的管理维护等操作,系统结构图如下图4-1所示。
在这里插入图片描述

2.2数据库设计

管理员信息实体属性图如图4-2所示。
在这里插入图片描述
学生信息实体属性图如图4-3所示。
在这里插入图片描述
教师信息实体属性图如图4-4所示。
在这里插入图片描述
试题信息实体属性图如图4-5所示。
在这里插入图片描述

三、系统项目部分截图

3.1管理员功能模块

管理员通过后台登录窗口进行输入自己的账号、密码、验证码等信息,进行登录,如图5-1所示。
在这里插入图片描述

3.2学生信息管理

学生信息管理,管理员通过学生信息可以在线查看学号、密码、姓名、性别、头像、院校、班级、手机等信息,进行详情或修改、删除操作,如图5-3所示。
在这里插入图片描述

3.3教师后台功能模块

试卷管理:教师通过列表可以获取试卷名称、考试时长(分钟)、试卷状态,进行查看添加、修改等信息操作,如图5-7所示。
在这里插入图片描述

3.4学生功能模块

学生通过后台登录窗口进行输入自己的账号、密码等信息,进行登录,如图5-10所示。
在这里插入图片描述
问题发布管理,学生通过问题发布管理可以在线查看标题、题目、发布时间、学号、姓名、答案进行详情并添加/修改、删除操作,如图5-11所示。
在这里插入图片描述

四、部分核心代码

4.1 用户部分

package com.controller;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
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 org.springframework.web.multipart.MultipartFile;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;

/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		File path = new File(ResourceUtils.getURL("classpath:static").getPath());
		if(!path.exists()) {
		    path = new File("");
		}
		File upload = new File(path.getAbsolutePath(),"/upload/");
		if(!upload.exists()) {
		    upload.mkdirs();
		}
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(upload.getAbsolutePath()+"/"+fileName);
		file.transferTo(dest);
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public ResponseEntity<byte[]> download(@RequestParam String fileName) {
		try {
			File path = new File(ResourceUtils.getURL("classpath:static").getPath());
			if(!path.exists()) {
			    path = new File("");
			}
			File upload = new File(path.getAbsolutePath(),"/upload/");
			if(!upload.exists()) {
			    upload.mkdirs();
			}
			File file = new File(upload.getAbsolutePath()+"/"+fileName);
			if(file.exists()){
				/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
					getResponse().sendError(403);
				}*/
				HttpHeaders headers = new HttpHeaders();
			    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    
			    headers.setContentDispositionFormData("attachment", fileName);    
			    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
	}
	
}

获取源码或论文

如需对应的论文或源码,也可以下方微信联系我

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值