手机网站设置,定制开发小程序,中国专业摄影网,做棋牌游戏网站赚钱吗作者主页#xff1a;舒克日记 简介#xff1a;Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 项目介绍
系统具备友好性且功能完善。管理员登录进入后台之后#xff0c;主要完成花材选择管理#xff0c;用户管理#xff0c;鲜花管理#xff0c;鲜花出入… 作者主页舒克日记 简介Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 项目介绍
系统具备友好性且功能完善。管理员登录进入后台之后主要完成花材选择管理用户管理鲜花管理鲜花出入库管理鲜花订单管理等。
用户联系客服咨询问题查看鲜花可以收藏购买评论鲜花支付订单管理个人订单等
环境要求
1.运行环境最好是java jdk1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境Tomcat7.x,8.X,9.x版本均可
4.硬件环境windows7/8/10 4G内存以上或者Mac OS;
5.是否Maven项目是查看源码目录中是否包含pom.xml;若包含则为maven项目否则为非maven.项目
6.数据库MySql5.7/8.0等版本均可
技术栈
运行环境jdk8 tomcat9 mysql5.7 windows10
服务端技术Java、Spring、SpringMVC、MybatisSSM
使用说明
1.使用Navicati或者其它工具在mysql中创建对应sq文件名称的数据库并导入项目的sql文件
2.使用IDEA/Eclipse/MyEclipse导入项目修改配置运行项目
3.将项目中config-propertiesi配置文件中的数据库配置改为自己的配置然后运行
运行指导
idea导入源码空间站顶目教程说明(Vindows版)-ssm篇
http://mtw.so/5MHvZq
源码地址http://codegym.top
运行截图
文档截图 项目截图 代码
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 EntityWrapperConfigEntity().eq(name, faceFile));if(configEntitynull) {configEntity new ConfigEntity();configEntity.setName(faceFile);configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put(file, fileName);}/*** 下载文件*/IgnoreAuthRequestMapping(/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; charsetUTF-8);IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());}} catch (IOException e) {e.printStackTrace();}}}