基于Springboot实现专业认证材料管理系统

简介: 基于Springboot实现专业认证材料管理系统

一,项目简介


这是一个基于java的毕业设计项目,毕设课题为springboot框架的知识产权服务平台系统, 是一个采用b/s结构的javaweb项目, 开发工具eclipsei/eclipse, 项目框架jsp+springboot+mybatis, 知识产权服务平台系统采用mysql进行数据存储, 并基于mybatis进行了orm实体关系映射, 该知识产权服务平台系统系统通过模块化实现,支持多角色权限管理系统, 提升了管理效率, 知识产权服务平台系统参考文献可见附件中的毕业论文与毕设源码


该知识产权服务平台系统项目采用mvc设计模式, 其中知识产权服务平台系统的视图与知识产权服务平台系统业务逻辑进行了分层设计, 特别方便后续知识产权服务平台系统系统的开发


设计这种mvc的架构的好处是完全的可以将业务进行分层, 进行高内聚低耦合, 分为service层, dao层, controller层, 架构清晰


本项目主要基于Springboot 和ruoyi来开发一套专业认证材料管理系统,对各专业相关的文档材料进行管理,主要包含的功能模块有:


系统管理:用户管理、角色管理、菜单管理、操作日志


业务模块:专业管理、认证材料管理、相关网站管理

二,环境介绍


语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

开发技术:Springboot+ruoyi+bootstrap

三,系统展示


用户登陆:

image.png

用户注册:

image.png

用户管理

image.png

角色管理

image.png

菜单管理

image.png

操作管理

image.png

专业管理

image.png

认证材料管理

image.png

相关网站

image.png

个人中心

image.png

修改密码

image.png

四,核心代码展示


package com.code.project.common;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.code.common.constant.Constants;
import com.code.common.utils.StringUtils;
import com.code.common.utils.file.FileUploadUtils;
import com.code.common.utils.file.FileUtils;
import com.code.common.utils.security.ShiroUtils;
import com.code.framework.config.RuoYiConfig;
import com.code.framework.config.ServerConfig;
import com.code.framework.web.domain.AjaxResult;
/**
 * 通用请求处理
 *
 * @author ruoyi
 */
@Controller
public class CommonController
{
    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
    @Autowired
    private ServerConfig serverConfig;
    /**
     * 通用下载请求
     *
     * @param fileName 文件名称
     * @param delete 是否删除
     */
    @GetMapping("common/download")
    public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
    {
        try
        {
            if (!FileUtils.isValidFilename(fileName))
            {
                throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
            }
            String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
            String filePath = System.getProperty("user.dir").replace('\\','/')+RuoYiConfig.getDownloadPath() + fileName;
            System.out.println(filePath);
            response.setCharacterEncoding("utf-8");
            response.setContentType("multipart/form-data");
            response.setHeader("Content-Disposition",
                    "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName));
            FileUtils.writeBytes(filePath, response.getOutputStream());
            if (delete)
            {
                FileUtils.deleteFile(filePath);
            }
        }
        catch (Exception e)
        {
            log.error("下载文件失败", e);
        }
    }
    /**
     * 通用上传请求
     */
    @PostMapping("/common/upload")
    @ResponseBody
    public AjaxResult uploadFile(MultipartFile file) throws Exception
    {
        try
        {
            // 上传文件路径
            String filePath = System.getProperty("user.dir").replace('\\','/')+RuoYiConfig.getUploadPath();
            System.out.println(filePath);
            // 上传并返回新文件名称
            String fileName = FileUploadUtils.upload(filePath, file);
            String url = serverConfig.getUrl() + fileName;
            AjaxResult ajax = AjaxResult.success();
            ajax.put("fileName", fileName);
            ajax.put("url", url);
            return ajax;
        }
        catch (Exception e)
        {
            return AjaxResult.error(e.getMessage());
        }
    }
    /**
     * 本地资源通用下载
     */
    @GetMapping("/common/download/resource")
    public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
            throws Exception
    {
        // 本地资源路径
        String localPath = System.getProperty("user.dir").replace('\\','/')+RuoYiConfig.getProfile();
        // 数据库资源地址
        String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
        // 下载名称
        String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
        response.setCharacterEncoding("utf-8");
        response.setContentType("multipart/form-data");
        response.setHeader("Content-Disposition",
                "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, downloadName));
        FileUtils.writeBytes(downloadPath, response.getOutputStream());
    }
}
package com.code.project.monitor.online.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.code.common.utils.security.ShiroUtils;
import com.code.framework.aspectj.lang.annotation.Log;
import com.code.framework.aspectj.lang.enums.BusinessType;
import com.code.framework.shiro.session.OnlineSessionDAO;
import com.code.framework.web.controller.BaseController;
import com.code.framework.web.domain.AjaxResult;
import com.code.framework.web.page.TableDataInfo;
import com.code.project.monitor.online.domain.OnlineSession;
import com.code.project.monitor.online.domain.UserOnline;
import com.code.project.monitor.online.domain.OnlineSession.OnlineStatus;
import com.code.project.monitor.online.service.IUserOnlineService;
/**
 * 在线用户监控
 * 
 * @author ruoyi
 */
@Controller
@RequestMapping("/monitor/online")
public class UserOnlineController extends BaseController
{
    private String prefix = "monitor/online";
    @Autowired
    private IUserOnlineService userOnlineService;
    @Autowired
    private OnlineSessionDAO onlineSessionDAO;
    @RequiresPermissions("monitor:online:view")
    @GetMapping()
    public String online()
    {
        return prefix + "/online";
    }
    @RequiresPermissions("monitor:online:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(UserOnline userOnline)
    {
        startPage();
        List<UserOnline> list = userOnlineService.selectUserOnlineList(userOnline);
        return getDataTable(list);
    }
    @RequiresPermissions("monitor:online:batchForceLogout")
    @Log(title = "在线用户", businessType = BusinessType.FORCE)
    @PostMapping("/batchForceLogout")
    @ResponseBody
    public AjaxResult batchForceLogout(@RequestParam("ids[]") String[] ids)
    {
        for (String sessionId : ids)
        {
            UserOnline online = userOnlineService.selectOnlineById(sessionId);
            if (online == null)
            {
                return error("用户已下线");
            }
            OnlineSession onlineSession = (OnlineSession) onlineSessionDAO.readSession(online.getSessionId());
            if (onlineSession == null)
            {
                return error("用户已下线");
            }
            if (sessionId.equals(ShiroUtils.getSessionId()))
            {
                return error("当前登陆用户无法强退");
            }
            onlineSession.setStatus(OnlineStatus.off_line);
            onlineSessionDAO.update(onlineSession);
            online.setStatus(OnlineStatus.off_line);
            userOnlineService.saveOnline(online);
        }
        return success();
    }
    @RequiresPermissions("monitor:online:forceLogout")
    @Log(title = "在线用户", businessType = BusinessType.FORCE)
    @PostMapping("/forceLogout")
    @ResponseBody
    public AjaxResult forceLogout(String sessionId)
    {
        UserOnline online = userOnlineService.selectOnlineById(sessionId);
        if (sessionId.equals(ShiroUtils.getSessionId()))
        {
            return error("当前登陆用户无法强退");
        }
        if (online == null)
        {
            return error("用户已下线");
        }
        OnlineSession onlineSession = (OnlineSession) onlineSessionDAO.readSession(online.getSessionId());
        if (onlineSession == null)
        {
            return error("用户已下线");
        }
        onlineSession.setStatus(OnlineStatus.off_line);
        onlineSessionDAO.update(onlineSession);
        online.setStatus(OnlineStatus.off_line);
        userOnlineService.saveOnline(online);
        return success();
    }
}
package com.code.project.monitor.server.controller;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.code.framework.web.controller.BaseController;
import com.code.project.monitor.server.domain.Server;
/**
 * 服务器监控
 * 
 * @author ruoyi
 */
@Controller
@RequestMapping("/monitor/server")
public class ServerController extends BaseController
{
    private String prefix = "monitor/server";
    @RequiresPermissions("monitor:server:view")
    @GetMapping()
    public String server(ModelMap mmap) throws Exception
    {
        Server server = new Server();
        server.copyTo();
        mmap.put("server", server);
        return prefix + "/server";
    }
}

五,项目总结


   本项目界面简洁大方,功能完整,适合做课程设计和毕业设计使用,另外可以在此项目框架的基础上自行添加或修改相关的功能。

相关文章
|
4天前
|
Web App开发 编解码 Java
B/S基层卫生健康云HIS医院管理系统源码 SaaS模式 、Springboot框架
基层卫生健康云HIS系统采用云端SaaS服务的方式提供,使用用户通过浏览器即能访问,无需关注系统的部署、维护、升级等问题,系统充分考虑了模板化、配置化、智能化、扩展化等设计方法,覆盖了基层医疗机构的主要工作流程,能够与监管系统有序对接,并能满足未来系统扩展的需要。
29 4
|
17天前
|
安全 数据安全/隐私保护
Springboot+Spring security +jwt认证+动态授权
Springboot+Spring security +jwt认证+动态授权
|
5天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的教师管理系统的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的教师管理系统的详细设计和实现
32 2
|
5天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的健身管理系统及会员微信小程序的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的健身管理系统及会员微信小程序的详细设计和实现
25 0
|
15天前
|
JavaScript 前端开发 Java
Springboot+vue地方废品回收机构管理系统
Spring Boot和Vue.js结合打造Web应用。Spring Boot简化企业级应用开发,Vue.js专注用户界面。示例展示了一个简单的废品回收系统,包含用户管理、废品分类和回收记录模块。后端提供获取废品分类的API,前端使用Vue.js和Axios展示分类列表。实际项目需扩展登录、权限等更多功能。
23 7
|
15天前
|
前端开发 JavaScript Java
Springboot+vue的医患档案管理系统
这是一个医患档案管理系统,包含用户管理、病历管理和预约管理模块。示例展示了一个Spring Boot后端接口,用于获取所有病历信息,以及一个Vue.js前端,使用Axios调用该接口显示病历列表。实际项目需考虑登录、权限及病历CRUD功能,可按需求和技术栈扩展。
26 7
|
22天前
|
JavaScript Java 关系型数据库
基于 java + Springboot + vue +mysql 大学生实习管理系统(含源码)
本文档介绍了基于Springboot的实习管理系统的设计与实现。系统采用B/S架构,旨在解决实习管理中的人工管理问题,提高效率。系统特点包括对用户输入的验证和数据安全性保障。功能涵盖首页、个人中心、班级管理、学生管理、教师管理、实习单位管理、实习作业管理、教师评分管理、单位成绩管理和系统管理等。用户分为管理员、教师和学生,各自有不同的操作权限。
|
27天前
|
存储 监控 NoSQL
SpringBoot 后台管理系统
SpringBoot 后台管理系统
9 0
|
16天前
|
Java Linux
Springboot 解决linux服务器下获取不到项目Resources下资源
Springboot 解决linux服务器下获取不到项目Resources下资源
|
23天前
|
Java API Spring
SpringBoot项目调用HTTP接口5种方式你了解多少?
SpringBoot项目调用HTTP接口5种方式你了解多少?
78 2