当前位置: 首页 > news >正文

基于SSM的校园停车场管理系统设计与实现

末尾获取源码
开发语言:Java
Java开发工具:JDK1.8
后端框架:SSM
前端:采用JSP技术开发
数据库:MySQL5.7和Navicat管理工具结合
服务器:Tomcat8.5
开发软件:IDEA / Eclipse
是否Maven项目:是


目录

一、项目简介

二、系统功能

三、系统项目截图

教师信息管理

停车区域管理

车位信息管理

新闻信息管理

四、核心代码

登录相关

文件上传

封装


一、项目简介

现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本校园停车场管理系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此校园停车场管理系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发.校园停车场管理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。

关键词:校园停车场管理系统;SSM框架;Mysql;自动化


二、系统功能



三、系统项目截图

教师信息管理

此页面提供给管理员的功能有:教师信息的查询管理,可以删除教师信息、修改教师信息、新增教师信息,还进行了对教师名称的模糊查询的条件

停车区域管理

此页面提供给管理员的功能有:查看已发布的停车区域数据,修改停车区域,停车区域作废,即可删除。

 

车位信息管理

此页面提供给管理员的功能有:根据车位信息进行条件查询,还可以对车位信息进行新增、修改、查询操作等等。

 

新闻信息管理

此页面提供给管理员的功能有:根据新闻信息进行新增、修改、查询操作等等。

 


四、核心代码

登录相关


package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;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.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
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.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

文件上传

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{@Autowiredprivate 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);FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));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);}}

封装

package com.utils;import java.util.HashMap;
import java.util.Map;/*** 返回数据*/
public class R extends HashMap<String, Object> {private static final long serialVersionUID = 1L;public R() {put("code", 0);}public static R error() {return error(500, "未知异常,请联系管理员");}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r = new R();r.put("code", code);r.put("msg", msg);return r;}public static R ok(String msg) {R r = new R();r.put("msg", msg);return r;}public static R ok(Map<String, Object> map) {R r = new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;}
}

相关文章:

基于SSM的校园停车场管理系统设计与实现

末尾获取源码 开发语言&#xff1a;Java Java开发工具&#xff1a;JDK1.8 后端框架&#xff1a;SSM 前端&#xff1a;采用JSP技术开发 数据库&#xff1a;MySQL5.7和Navicat管理工具结合 服务器&#xff1a;Tomcat8.5 开发软件&#xff1a;IDEA / Eclipse 是否Maven项目&#x…...

块设备 I/O 请求送达到外部设备

对于 ext4 文件系统&#xff0c;最后调用的是 ext4_file_write_iter&#xff0c;它将 I/O 的调用分成两种情况&#xff1a; 第一是直接 I/O。最终我们调用的是 generic_file_direct_write&#xff0c;这里调用的是 mapping->a_ops->direct_IO&#xff0c;实际调用的是 e…...

【ArcGIS Pro二次开发】(76):面积平差工具

之前做过一个【三调土地利用现状分类面积汇总】的工具&#xff0c;在流程中使用了面积平差的方法。 考虑了在其它场合可能也需要进行面积平差&#xff0c;因此单独提取出来作为一个工具。 平差实现的方法如下图&#xff1a; 主要的计算过程如上图所示&#xff0c;算出总面积差…...

4、智能家居框架设计和代码文件工程建立

目录 一、智能家居项目框架 二、智能家居工厂模式示意 三、代码文件工程建立 SourceInsight创建新工程步骤 一、智能家居项目框架 二、智能家居工厂模式示意 三、代码文件工程建立 创建一个名为si的文件夹用于保存SourceInsight生成的文件信息&#xff0c;然后在SourceInsig…...

网络编程TCP/UDP

1 网络通信概述 1.1 IP 和端口 所有的数据传输&#xff0c;都有三个要素 &#xff1a;源、目的、长度。 怎么表示源或者目的呢&#xff1f;请看图 所以&#xff0c;在网络传输中需要使用“IP 和端口”来表示源或目的。 1.2 网络传输中的 2 个对象&#xff1a;server 和 clie…...

移远EC600U-CN开发板 11.15

制作一个简单UI: 1."端口设置"模块 *效果图 *代码 def backEvent(evt): #返回主界面code evt.get_code() if code lv.EVENT.CLICKED:lv.scr_load(mainInterface)def popUpEvent(evt): #弹窗提醒code evt.get_code()if code lv.EVENT.CL…...

Docker - MySQL Database is uninitialized and password option is not specified

问题描述 docker run --namemaster -p 3306:3306 -d mysql 2022-11-11 08:03:0500:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started. 2022-11-11 08:03:0500:00 [Note] [Entrypoint]: Switching to dedicated user mysql 2022-11-11 08:03…...

Elasticsearch 之聚合分析

本文主要介绍 Elasticsearch 的聚合功能&#xff0c;介绍什么是 Bucket 和 Metric 聚合&#xff0c;以及如何实现嵌套的聚合。 首先来看下聚合&#xff08;Aggregation&#xff09;&#xff1a; 1 什么是 Aggregation&#xff1f; 首先举一个生活中的例子&#xff0c;这个是京…...

Django(七、模型层)

文章目录 模型层模型层前期准备使用django ORM要注意 代码演示&#xff1a;切换MySQL数据库如何查看django ORM 底层原理&#xff1f; 单表操作模型层之ORM常见关键字基础的增删改查常用的关键字 常见的十几种查询基于双下滑线的查询 模型层 模型层前期准备 使用django ORM要…...

LeetCode105. Construct Binary Tree from Preorder and Inorder Traversal

文章目录 一、题目二、题解 一、题目 Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree. Example 1: Input: pre…...

python链表_递归求和_递归求最大小值

创建一个单链表&#xff1a; class LinkNode: #设置属性def __init__(self,data None):self.data dataself.next None class LinkList: #设置头结点def __init__(self):self.head LinkNode()self.head.next Nonedef CreateListR(self,a): …...

Java中生成指定字体的印章

文章目录 1.引入字体2.Windows环境下3. Linux环境下 生成印章测试类绘制方章测试类 1.引入字体 2.Windows环境下 如果在Windows上安装JAVA环境时&#xff0c;没有安装单独的jre1.8.0_141的话。那么字体就只放到\jdk1.8.0_141\jre\lib\fonts目前下。 3. Linux环境下 cat /etc…...

Winodws核心编程 多线程

目录 一、基本概念 二、线程创建函数 三、Windows内核对象与句柄 四、简单的多线程案例 五、线程同步 - 互斥对象 六、多线程实现群聊的服务端和客户端 七、线程同步 - 事件对象 八、事件对象 与 互斥对象区别 九、线程同步 - 信号量 十、线程同步 - 关键代码段 十一…...

旺店通·企业版对接打通金蝶云星空查询调拨单接口与分布式调入单新增接口

旺店通企业版对接打通金蝶云星空查询调拨单接口与分布式调入单新增接口 源系统:旺店通企业版 旺店通是北京掌上先机网络科技有限公司旗下品牌&#xff0c;国内的零售云服务提供商&#xff0c;基于云计算SaaS服务模式&#xff0c;以体系化解决方案&#xff0c;助力零售企业数字化…...

关于对Java中volatile关键字的理解与简述

【版权声明】未经博主同意&#xff0c;谢绝转载&#xff01;&#xff08;请尊重原创&#xff0c;博主保留追究权&#xff09; https://blog.csdn.net/m0_69908381/article/details/134430096 出自【进步*于辰的博客】 启发之作&#xff1a;Java volatile关键字最全总结&#xf…...

37 _ 贪心算法:如何用贪心算法实现Huffman压缩编码?

基础的数据结构和算法我们基本上学完了,接下来几节,我会讲几种更加基本的算法。它们分别是贪心算法、分治算法、回溯算法、动态规划。更加确切地说,它们应该是算法思想,并不是具体的算法,常用来指导我们设计具体的算法和编码等。 贪心、分治、回溯、动态规划这4个算法思想…...

Unity中Shader矩阵的逆矩阵

文章目录 前言一、逆矩阵的表示二、逆矩阵的作用四、逆矩阵的计算五、顺序的重要性六、矩阵的逆总结1、求矩阵的逆前&#xff0c;这个矩阵必须得是个方阵2、只有 A x A ^-1^ A^-1^ x A 1时&#xff0c;A的逆才是A^-1^3、求2x2矩阵的逆&#xff1a;交换 a 和 b 的位置&#xf…...

我给网站做公安备案年度安全评估

我是卢松松&#xff0c;点点上面的头像&#xff0c;欢迎关注我哦&#xff01; 差不多从2020年开始&#xff0c;我们的网站每年11月左右就要去公安备案做一次年度的安全评估&#xff0c;而现在又新增了APP和小程序备案。如下图所示&#xff1a; 评估的内容也很简单&#xff0c…...

iceoryx(冰羚)-通信中间件解析

iceoryx(冰羚)-简介 iceoryx(冰羚)-Architecture iceoryx(冰羚)-Service Discovery iceoryx(冰羚)-examples-callbacks iceoryx(冰羚)-Listener设计 [iceoryx(冰羚)-ipc消息通信] [iceoryx(冰羚)-共享内存实现]...

Windows系统CMake+VS编译protobuf

目录 一些名词CMake构建VS工程下载protobuf源码下载CMake编译QT中使用 方案二失败&#xff1a;CMakeQT自带的Mingw编译参考链接 一些名词 lib dll lib库实际上分为两种&#xff0c;一种是静态链接lib库或者叫做静态lib库&#xff0c;另一种叫做动态链接库dll库的lib导入库或称…...

混合求解器:用神经网络增强传统微分方程数值方法

1. 项目概述&#xff1a;当数值方法遇到机器学习在科学计算和工程仿真领域&#xff0c;求解常微分方程&#xff08;ODE&#xff09;和偏微分方程&#xff08;PDE&#xff09;是绕不开的核心任务。无论是模拟电路中的电流变化、预测天气系统的演变&#xff0c;还是分析机械结构的…...

量子软件测试的挑战与优化策略

1. 量子软件测试的挑战与机遇量子计算正在从实验室走向实际应用&#xff0c;随之而来的是对可靠量子软件的需求激增。与传统软件不同&#xff0c;量子程序面临三大独特挑战&#xff1a;首先&#xff0c;量子态的叠加性和纠缠性使得测试变得异常复杂。一个n量子比特系统可以同时…...

基于ATmega2560与ISD1700的智能语音时钟:硬件选型、软件架构与避坑指南

1. 项目概述与核心价值去年折腾那个用ATMega328驱动三块显示屏的时钟时&#xff0c;我主要精力都花在了如何在320x240的TFT屏幕上把时间、日期和图标画得又准又好看上。项目在《Elektor》杂志上发表后&#xff0c;一位热心的读者给我提了个新想法&#xff1a;能不能做个会“说话…...

基于ESP32的AIS转WiFi转换器:实现NMEA 0183数据无线传输

1. 项目概述&#xff1a;从VHF-AIS接收器到iPad的无线桥梁作为一名经常在海上折腾电子设备的航海爱好者&#xff0c;我最近遇到了一个挺实际的需求&#xff1a;我的主力导航设备是iPad上的iSailor应用&#xff0c;它功能强大、界面友好&#xff0c;但有个“硬伤”——它需要通过…...

PCB虚焊/走线断裂/焊盘脱落工程师易漏判

PCB 故障中&#xff0c;30% 并非元件损坏&#xff0c;而是 PCB 本身的隐性故障—— 虚焊、走线断裂、焊盘脱落、过孔开路。这类故障外观隐蔽、时好时坏、排查难度大&#xff0c;很多工程师反复更换元件仍无法解决&#xff0c;最终误判为 “板报废”。​一、PCB 隐性故障核心成因…...

账务台账数据

银行里说的 “账务台账数据”&#xff0c;本质就是按会计规则把每笔业务逐笔、分户、分科目记下来的完整明细流水 余额 辅助信息&#xff0c;核心是 “可逐笔追溯、可对账、可审计” 的一套明细数据。下面用通俗、具体的方式拆开说&#xff1a;一、银行 “账务台账” 到底是什…...

RevSSH反向SSH隧道:无公网IP设备的安全远程运维方案

1. 这不是又一个SSH封装工具——RevSSH解决的是“根本性连接悖论”你有没有遇到过这样的场景&#xff1a;一台部署在客户内网的嵌入式设备&#xff0c;没有公网IP&#xff0c;NAT穿透失败&#xff0c;防火墙策略死死锁住所有入向端口&#xff0c;连ICMP都被禁了&#xff1b;或者…...

基于IRS2092的200W D类功放设计:从PWM原理到保护电路实战

1. 项目概述与核心思路折腾音响功放&#xff0c;从经典的AB类玩到D类&#xff0c;感觉就像是从燃油车换到了电动车&#xff0c;动力响应和效率完全是两个维度。这次要聊的这块“200W Class-D Audio Power Amplifier [150115]”单板功放&#xff0c;就是一个非常典型的D类功放设…...

基于C#实现(WinForm)P2P聊天程序

♻️ 资源 大小&#xff1a; 29.8MB ➡️ 资源下载&#xff1a;https://download.csdn.net/download/s1t16/87430269 p2p聊天程序 一、功能介绍 1.1 登录 用户凭用户名和密码登录系统&#xff0c;可以更换服务器 IP 和端口&#xff0c;以防网络不畅通&#xff0c;连接服务…...

基于PIC32单片机实现Android USB音频转SPDIF输出的DIY方案

1. 项目概述&#xff1a;为Android设备打造一个高保真SPDIF音频接口作为一名长期折腾嵌入式音频和家庭影院的玩家&#xff0c;我经常遇到一个痛点&#xff1a;手头那些性能不错的Android手机或平板&#xff0c;其内置的3.5mm耳机孔或者USB-C口的音频输出质量&#xff0c;在连接…...