SSM SpringBoot vue限房摇号系统

SSM限房摇号系统功能介绍

首页 房源信息 我的收藏 登录注册 个人中心

后台管理 登录注册 个人中心 户型信息管理 面积信息管理 地段信息管理
房企信息管理 房源信息管理 用户管理 轮候序号管理 房源申购管理
我的摇号管理 我的收藏管理 管理员管理

使用技术

  • SSM(Spring + SpringMVC + Mybaits)或SpringBoot框架

  • Mysql数据库

  • vue后台管理

功能展示








FileController文件上传下载

package com.controller;import java.io.File;
import java.io.IOException;
import java.util.Date;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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,HttpServletRequest request) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);String fileName = new Date().getTime()+"."+fileExt;File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+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 void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {try {File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);if (file.exists()) {response.reset();response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");response.setHeader("Cache-Control", "no-cache");response.setHeader("Access-Control-Allow-Credentials", "true");response.setContentType("application/octet-stream; charset=UTF-8");IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());}} catch (IOException e) {e.printStackTrace();}}}

spring-mvc.xml配置文件上传大小

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"><mvc:default-servlet-handler/><!-- Controller包(自动注入) --><context:component-scan base-package="com.controller"/><!-- FastJson注入 --><mvc:annotation-driven><!-- <mvc:message-converters register-defaults="true">避免IE执行AJAX时,返回JSON出现下载文件FastJson<bean id="fastJsonHttpMessageConverter"class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter"><property name="supportedMediaTypes"><list>这里顺序不能反,一定先写text/html,不然ie下出现下载提示<value>text/html;charset=UTF-8</value><value>application/json;charset=UTF-8</value></list></property><property name="features"><array value-type="com.alibaba.fastjson.serializer.SerializerFeature">避免循环引用<value>DisableCircularReferenceDetect</value>是否输出值为null的字段<value>WriteMapNullValue</value>数值字段如果为null,输出为0,而非null<value>WriteNullNumberAsZero</value>字符类型字段如果为null,输出为"",而非null <value>WriteNullStringAsEmpty</value>List字段如果为null,输出为[],而非null<value>WriteNullListAsEmpty</value>Boolean字段如果为null,输出为false,而非null<value>WriteNullBooleanAsFalse</value></array></property></bean></mvc:message-converters> --></mvc:annotation-driven><!-- 静态资源配置 --><mvc:resources mapping="/resources/**" location="/resources/"/><!-- 对模型视图名称的解析,即在模型视图名称添加前后缀 --><bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"><property name="prefix" value="/WEB-INF/pages/"/><property name="suffix" value=".jsp"/></bean><!-- 拦截器配置 --><mvc:interceptors><mvc:interceptor><mvc:mapping path="/**"/><mvc:exclude-mapping path="/upload"/><bean class="com.interceptor.AuthorizationInterceptor"/></mvc:interceptor></mvc:interceptors><!-- 上传限制 --><bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"><!-- 上传文件大小限制为31M,31*1024*1024 --><property name="maxUploadSize" value="32505856"/></bean></beans>

运行

创建数据库, 然后修改数据库连接相关信息。

配置tomcat运行

前台访问地址:http://localhost:8080/ssm/front/index.html

后台访问地址:http://localhost:8080/ssm/admin/dist/index.html

管理员账号:liang 密码:liang

SSM SpringBoot vue限房摇号系统相关推荐

  1. SSM SpringBoot vue 在线教学质量评价系统

    SSM SpringBoot vue 在线教学质量评价系统 SSM 在线教学质量评价系统 功能介绍 首页 图片轮播展示 登录 学生注册 教师注册 督导注册 教师展示 教师详情 学生评价 课程信息 课程 ...

  2. java基于ssm springboot+vue的共享充电宝系统 element

    如今生活每个人都离不开手机,出门等地铁,公交车上,甚至上厕所都在玩手机,尤其是在现在手机应用多的数不胜数的情况下,各种APP应用吸引着用户大肆地玩手机,如游戏,新闻,和小视频等等,这些APP应用玩着会 ...

  3. 教学妹开发springboot+vue的博客论坛系统,so esay

    今天给大家介绍一个简单的系统. 基于springboot+vue的博客论坛系统,如果你想学习更多的项目源码,可以在文章的末尾领取源码资料. 当然前面已经开源了很多的项目源码,都是免费学习的: 1,挑战 ...

  4. java-php-python-基于springboot+vue的线上学习系统计算机毕业设计

    java-php-python-基于springboot+vue的线上学习系统计算机毕业设计 java-php-python-基于springboot+vue的线上学习系统计算机毕业设计 本源码技术栈 ...

  5. SSM SpringBoot vue解三阶魔方教学网站

    SSM SpringBoot vue解三阶魔方教学网站 SSM 解三阶魔方教学网站 功能介绍 首页 图片轮播 新闻资讯 魔方教程 魔方资料 留言板 登录注册 个人中心 我的收藏 后台管理 登录注册 个 ...

  6. 【项目实战】springboot+vue舞蹈课程在线学习系统-java舞蹈课程学习打卡系统的设计与实现

    注意:该项目只展示部分功能,如需了解,评论区咨询即可. 本文目录 1.开发环境 2 系统设计 2.1 背景意义 2.2 技术路线 2.3 主要研究内容 3 系统页面展示 3.1 学生 3.2 教师页面 ...

  7. SSM SpringBoot vue办公自动化计划管理系统

    SSM SpringBoot vue办公自动化计划管理系统 登录注册 个人中心 员工信息管理 部门信息管理 会议管理 计划管理 行程安排管理 行程进度管理 管理员管理 所列功能完整 使用技术: SSM ...

  8. 哈尔滨车牌摇号系统遭遇黑客攻击瘫痪

    今天(6月20日),素有冰城美誉的哈尔滨本应于上午九点开始互联网机动车选号,不料遭黑客攻击,导致系统崩溃.为了防止大量号牌流入非法渠道,哈尔滨市公安交通警察支队接到上级机关通知决定暂缓开通互联网选号系 ...

  9. WZOI-301车牌摇号系统

    题目描述: 汽车数量的急剧增加,导致城市交通的压力越来越大,许多大城市采取通过摇号方式来发放汽车车牌.在申请人通过资格审核后,车牌摇号系统反馈回一个唯一的编号.每次摇号前,车牌摇号系统需要收集所有本次 ...

最新文章

  1. gitolite搭建
  2. java B2B2C Springcloud多租户电子商城系统-docker-feign-hystrix-ribbon(七)
  3. python类中方法的执行顺序-Python中实例化class的执行顺序示例详解
  4. JavaScript操作select控件
  5. spring boot 2.0 集成shiro注意事项
  6. 安装win7系统不能开机启动服务器,win7系统开机启动项不能加载的原因分析及解决...
  7. oracle11g session,Oracle11g中Killsession心得
  8. 2020“家”经济时代开启——中国到家服务行业研究报告
  9. 开源 非开源_开源周中的女性
  10. Ext JS 4倒计时:图形和图表
  11. 安卓4.4不支持touchend事件解决办法
  12. 矩阵论7,8,9作业
  13. 三星java游戏下载_轻松游戏 三星Z500安装java游戏详细教程
  14. 九宫格拼图小游戏代码html,js实现九宫格拼图小游戏.pdf
  15. 分布式数据库笔记 —— 数据一致性模型
  16. Android Framework 音频子系统(02)音频系统框架
  17. PC端的TIM无法打开?打开“QPCore Service”服务 ,访问被拒?关掉杀毒软件
  18. 渲染到纹理(Render To Texture, RTT)
  19. html适合app的登陆页面,纯CSS3创意手机APP登录界面动画特效
  20. Cook-Torrance/ Ward反射方程

热门文章

  1. 再也不写个人日记了,再也...
  2. sd3403开发板学习(一)
  3. CityEngine 三维管道建模教程
  4. EMV技术学习和研究(十一)QPBOC
  5. 嵌入式系统硬件体系设计(一)
  6. Android 模拟点击
  7. React 模拟点击事件
  8. 2021-06-22 9点30 程序外生活 - 中国A50指数 机器预测学习跟踪记录 - 周一晚上第一个较为正常的4小时反弹出现,日线底分型出现,量能上有持续反弹概率高。周月线持续跌势。
  9. 第六次网页前端培训笔记(JavaScript)
  10. Framer X 21 特别版 Mac 强大的移动应用交互原型设计神器工具