大连城市建设档案馆官方网站,怎么用eclipse做网站开发,网站首页怎么做营业执照链接,布吉企业网站建设作者主页#xff1a;源码空间codegym 简介#xff1a;Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 项目介绍
springboot003图书个性化推荐系统的设计与实现
管理员#xff1a;首页、个人中心、学生管理、图书分类管理、图书信息管理、图书预约管理、退… 作者主页源码空间codegym 简介Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 项目介绍
springboot003图书个性化推荐系统的设计与实现
管理员首页、个人中心、学生管理、图书分类管理、图书信息管理、图书预约管理、退换图书管理、管理员管理、留言板管理、系统管理
学生首页、个人中心、图书预约管理、退换图书管理、我的收藏管理前台首页首页、图书信息、好书推荐、留言反馈、个人中心、后台管理等功能。
JAVA语言MYSQL数据库Spring Boot框架
环境要求
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
服务端技术Spring Boot Mybatis VUE
使用说明
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 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;
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 javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.Date;/*** 上传文件映射表*/
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();}}}