可提供远程搭建运行服务

不会调试运行的同学,你只需打开远程,会帮你搭建调试好一切(JDK、Idea/Eclipse、MySQL、Tomcat、Maven………) 有偿

点击获取源码

技术栈

java+springboot+bootstrap+html+maven+mysql

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能介绍

本项目分为管理员与学生两种角色, 管理员角色包含以下功能: 登录,图书查询,加入购物车,用户管理,添加用户,角色管理,管理权限,图书管理,进行还书等功能。

学生角色包含以下功能: 登录页面,查看图书列表,好看要预定的图书,开始借阅等功能。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本; 6.是否Maven项目:是;

技术栈

1.后端: SpringBoot 2.前端: HTML+CSS+JavaScript+jquery+bootstrap使用说明

使用说明

1.使用Navicat或者其它工具,在mysl中创建对应名称的数据库,并导入项目的sql文件;
2.使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3.将项目中application.properties配置文件中的数据库配置改为自己的配置;4. 运行项目,输入localhost:8080/登录

效果图






部分代码

图书管理类控制层:

图书管理类

@Controller

@RequestMapping(“/web/books”)

public class BookController extends BaseController{

@Autowired

private IBookService bookService;

@Autowired

private IBorrowBookService borrowBookService;

默认索引页

@RequestMapping(“/index”)

public String index() {

return “/admin/books/index”;
添加图书

@RequestMapping(value = {“/addBook”}, method = RequestMethod.GET)

public String addBook() {

return “admin/books/addform”;

删除图书

@RequestMapping(value = “/delete/{id}”, method = RequestMethod.POST)

@ResponseBody

public JsonResult delete(@PathVariable String id,ModelMap map) {

try {

bookService.delete(id);

} catch (Exception e) {

e.printStackTrace();

return JsonResult.failure(e.getMessage());

return JsonResult.success();

借书

@RequestMapping(value = { “/borrowlist/{borrowlist}” },method = RequestMethod.POST)

@ResponseBody

public JsonResult borrowList(@PathVariable String borrowlist,ModelMap map) {

if(!borrowlist.equals(“undefine”))

Gson gson=new Gson();

BorrowList mBorrowList=gson.fromJson(borrowlist,BorrowList.class);

BorrowBook[] borrowBook=new BorrowBook[mBorrowList.getBooklist().length];

Book[] book=new Book[mBorrowList.getBooklist().length];

int i=0;

while(i<mBorrowList.getBooklist().length)

borrowBook[i]=new BorrowBook();

book[i]=new Book();

borrowBook[i].setUserId(mBorrowList.getId());

borrowBook[i].setBookId(mBorrowList.getBooklist()[i]);

book[i]=bookService.findByBookId(mBorrowList.getBooklist()[i]);

//一本书只能借一次,因此需要判断一下该用户是否已经借过该书

BorrowBook isBorrowBook=borrowBookService.findByUserIdAndBookId(mBorrowList.getId(), mBorrowList.getBooklist()[i]);

if(book[i].getCurrentInventory()>0)

if(isBorrowBook==null)

book[i].setCurrentInventory(book[i].getCurrentInventory()-1);

bookService.saveOrUpdate(book[i]);

borrowBookService.save(borrowBook[i]);

}else

return JsonResult.failure(“您已经借阅该书!”);

}else

return JsonResult.failure(“库存不足请重新选择图书!”);

i++;

i=0;

return JsonResult.success();

}else

return JsonResult.failure(“未选择要借阅的书籍!”);

还书表

@RequestMapping(value = { “/returnBookList/{id}” },method = RequestMethod.POST)

@ResponseBody

public String ReturnBookList(@PathVariable String id,ModelMap map) {

BorrowBook[] borrowBooks=borrowBookService.findByUserId(Integer.parseInt(id));

Book[] books=new Book[borrowBooks.length];

Date date=null;

for(int i=0;i<books.length;i++)

books[i]=bookService.findByBookId(borrowBooks[i].getBookId());

Map<String,Object> resultMap=new HashMap();

resultMap.put(“borrowBooks”, borrowBooks);

resultMap.put(“books”, books);

Gson gson=new Gson();

String jsonStr = gson.toJson(resultMap);

return jsonStr;

归还图书

@RequestMapping(value = {“/returnBook/{borrowlist}”}, method = RequestMethod.POST)

@ResponseBody

public JsonResult returnBook(@PathVariable String borrowlist) {

Gson gson=new Gson();

BorrowList mBorrowList=gson.fromJson(borrowlist,BorrowList.class);

BorrowBook[] borrowBook=new BorrowBook[mBorrowList.getBooklist().length];

Book[] book=new Book[mBorrowList.getBooklist().length];

int i=0;

while(i<mBorrowList.getBooklist().length)

borrowBook[i]=new BorrowBook();

book[i]=new Book();

borrowBook[i].setUserId(mBorrowList.getId());

borrowBook[i].setBookId(mBorrowList.getBooklist()[i]);

book[i]=bookService.findByBookId(mBorrowList.getBooklist()[i]);

book[i].setCurrentInventory(book[i].getCurrentInventory()+1);

bookService.saveOrUpdate(book[i]);

borrowBookService.deletByUserIdAndBookId(borrowBook[i].getUserId(), borrowBook[i].getBookId());;

i++;

i=0;

return JsonResult.success();

修改图书响应请求

@RequestMapping(value = “/edit/{id}”, method = RequestMethod.GET)

public String edit(@PathVariable String id,ModelMap map) {

Book book = bookService.findByBookId(id);

map.put(“book”, book);

return “admin/books/addform”;

修改图书

@RequestMapping(value= {“/edit”} ,method = RequestMethod.POST)

@ResponseBody

public JsonResult edit( Book book,ModelMap map){

try {

bookService.saveOrUpdate(book);

} catch (Exception e) {

return JsonResult.failure(e.getMessage());

return JsonResult.success();

@RequestMapping(value = { “/list” })

@ResponseBody

public Page list() {

SimpleSpecificationBuilder builder = new SimpleSpecificationBuilder();

String searchText = request.getParameter(“searchText”);

if(StringUtils.isNotBlank(searchText)){

builder.add(“bookName”, Operator.likeAll.name(), searchText);

Page page = bookService.findAll(builder.generateSpecification(), getPageRequest());

return page;

查询图书

@RequestMapping(value = { “/findlist” })

@ResponseBody

public Page findList() {

SimpleSpecificationBuilder builder = new SimpleSpecificationBuilder();

String bookName = request.getParameter(“inputBookName”);

String bookAuthor = request.getParameter(“inputAuthor”);

String bookPress = request.getParameter(“inputPublication”);

if(StringUtils.isNotBlank(bookName)){

builder.add(“bookName”, Operator.likeAll.name(), bookName);

if(StringUtils.isNotBlank(bookAuthor)){

builder.add(“bookAuthor”, Operator.likeAll.name(), bookAuthor);

if(StringUtils.isNotBlank(bookPress)){

builder.add(“bookPress”, Operator.likeAll.name(), bookPress);

Page page = bookService.findAll(builder.generateSpecification(), getPageRequest());

return page;

用户管理控制层:

@Controller

@RequestMapping(“/admin/user”)

public class UserController extends BaseController {

@Autowired

private IUserService userService;

@Autowired

private IRoleService roleService;

@RequestMapping(value = { “/“, “/index” })

public String index() {

return “admin/user/index”;

@RequestMapping(value = { “/list” })

@ResponseBody

public Page list() {

SimpleSpecificationBuilder builder = new SimpleSpecificationBuilder();

String searchText = request.getParameter(“searchText”);

if(StringUtils.isNotBlank(searchText)){

builder.add(“nickName”, Operator.likeAll.name(), searchText);

Page page = userService.findAll(builder.generateSpecification(), getPageRequest());

return page;

@RequestMapping(value = “/add”, method = RequestMethod.GET)

public String add(ModelMap map) {

return “admin/user/form”;

@RequestMapping(value = “/edit/{id}”, method = RequestMethod.GET)

public String edit(@PathVariable Integer id,ModelMap map) {

User user = userService.find(id);

map.put(“user”, user);

return “admin/user/form”;

@RequestMapping(value= {“/edit”} ,method = RequestMethod.POST)

@ResponseBody

public JsonResult edit(User user,ModelMap map){

try {

System.out.println(“inputuser:”+user.toString());

userService.saveOrUpdate(user);

} catch (Exception e) {

return JsonResult.failure(e.getMessage());

return JsonResult.success();

@RequestMapping(value = “/delete/{id}”, method = RequestMethod.POST)

@ResponseBody

public JsonResult delete(@PathVariable Integer id,ModelMap map) {

try {

userService.delete(id);

} catch (Exception e) {

e.printStackTrace();

return JsonResult.failure(e.getMessage());

return JsonResult.success();

@RequestMapping(value = “/grant/{id}”, method = RequestMethod.GET)

public String grant(@PathVariable Integer id, ModelMap map) {

User user = userService.find(id);

map.put(“user”, user);

Set set = user.getRoles();

List roleIds = new ArrayList();

for (Role role : set) {

roleIds.add(role.getId());

map.put(“roleIds”, roleIds);

List roles = roleService.findAll();

map.put(“roles”, roles);

return “admin/user/grant”;

@ResponseBody

@RequestMapping(value = “/grant/{id}”, method = RequestMethod.POST)

public JsonResult grant(@PathVariable Integer id,String[] roleIds, ModelMap map) {

try {

userService.grant(id,roleIds);

} catch (Exception e) {

e.printStackTrace();

return JsonResult.failure(e.getMessage());

return JsonResult.success();

资源管理控制层:

@Controller

@RequestMapping(“/admin/resource”)

public class ResourceController extends BaseController {

@Autowired

private IResourceService resourceService;

@RequestMapping(“/tree/{resourceId}”)

@ResponseBody

public List tree(@PathVariable Integer resourceId){

List list = resourceService.tree(resourceId);

return list;

@RequestMapping(“/index”)

public String index() {

return “admin/resource/index”;

@RequestMapping(“/list”)

@ResponseBody

public Page list() {

SimpleSpecificationBuilder builder = new SimpleSpecificationBuilder();

String searchText = request.getParameter(“searchText”);

if(StringUtils.isNotBlank(searchText)){

builder.add(“name”, Operator.likeAll.name(), searchText);

Page page = resourceService.findAll(builder.generateSpecification(),getPageRequest());

return page;

@RequestMapping(value = “/add”, method = RequestMethod.GET)

public String add(ModelMap map) {

List list = resourceService.findAll();

map.put(“list”, list);

return “admin/resource/form”;

@RequestMapping(value = “/edit/{id}”, method = RequestMethod.GET)

public String edit(@PathVariable Integer id,ModelMap map) {

Resource resource = resourceService.find(id);

map.put(“resource”, resource);

List list = resourceService.findAll();

map.put(“list”, list);

return “admin/resource/form”;

@RequestMapping(value= {“/edit”}, method = RequestMethod.POST)

@ResponseBody

public JsonResult edit(Resource resource,ModelMap map){

try {

resourceService.saveOrUpdate(resource);

} catch (Exception e) {

return JsonResult.failure(e.getMessage());

return JsonResult.success();

@RequestMapping(value = “/delete/{id}”, method = RequestMethod.POST)

@ResponseBody

public JsonResult delete(@PathVariable Integer id,ModelMap map) {

try {

resourceService.delete(id);

} catch (Exception e) {

e.printStackTrace();

return JsonResult.failure(e.getMessage());

return JsonResult.success();

图书馆借阅管理系统(图书管理系统),可提供远程搭建运行服务相关推荐

  1. MFC超市商品管理系统学生成绩管理系统学生信息管理系统通讯录管理系统图书管理系统

    MFC超市商品管理系统学生成绩管理系统学生信息管理系统通讯录管理系统图书管理系统 序号 题目 数组保存数据 文件保存数据 数据库保存数据 1 超市商品管理系统 2 学生成绩管理系统 3 学生信息管理系 ...

  2. 图书馆、书吧、借阅室图书管理系统开发前期需求探索

    鉴于近期给一个客户开发图书馆图书管理系统,在与客户的合作过程中,遇到了很多问题,总结起来主要是前期需求不明确!因此,本文的目的主要是探讨关于图书管理系统开发前的客户需求调研,只有充分了解了客户的需求, ...

  3. 【计算机毕业设计】图书馆借阅管理系统

    一.系统截图(需要演示视频可以私聊) 摘  要 21世纪的今天,随着社会的不断发展与进步,人们对于信息科学化的认识,已由低层次向高层次发展,由原来的感性认识向理性认识提高,管理工作的重要性已逐渐被人们 ...

  4. (附源码)springboot图书管理系统 毕业设计 160934

    Springboot图书管理系统的设计与实现 摘 要 大数据时代下,数据呈爆炸式地增长.为了迎合信息化时代的潮流和信息化安全的要求,利用互联网服务于其他行业,促进生产,已经是成为一种势不可挡的趋势.在 ...

  5. 基于SpringBoot的图书管理系统毕业设计

    图书管理系统 摘要 大数据时代下,数据呈爆炸式地增长.为了迎合信息化时代的潮流和信息化安全的要求,利用互联网服务于其他行业,促进生产,已经是成为一种势不可挡的趋势.在图书馆管理的要求下,开发一款整体式 ...

  6. (附源码)spring boot图书管理系统 毕业设计 160934

    Springboot图书管理系统的设计与实现 摘 要 大数据时代下,数据呈爆炸式地增长.为了迎合信息化时代的潮流和信息化安全的要求,利用互联网服务于其他行业,促进生产,已经是成为一种势不可挡的趋势.在 ...

  7. 图书管理系统数据字典_2. 结构化——数据字典

    返回目录: Chilan Yuk:软件工程分析设计图库目录​zhuanlan.zhihu.com 一.基本知识 用于定义数据流和数据存储的结构,并给出构成所给的数据流和数据存储的各数据项的基本数据类型 ...

  8. python实现图书管理系统(课设)

    图书管理系统图书管理系统 某图书馆所藏图书如表1所示: 书号 书名 出版社 作者 价格 库存 10001 C语言程序设计 清华大学出版社 张三 51 5 10002 Python程序设计基础 高等教育 ...

  9. 基于python/django的图书管理系统

    摘  要 21世纪的今天,随着社会的不断发展与进步,人们对于信息科学化的认识,已由低层次向高层次发展,由原来的感性认识向理性认识提高,管理工作的重要性已逐渐被人们所认识,科学化的管理,使信息存储达到准 ...

最新文章

  1. 实对称矩阵的性质_浅谈矩阵的相似对角化(一)
  2. 一顿火锅钱+一台旧手机 = 自主导航机器人?
  3. 如何确定线程池的大小?
  4. C#字符串与unicode互相转换
  5. 23名“无名氏”流浪者成长沙县新市民
  6. linux系统分配文件夹内存,详解Linux系统内存知识及调优方案
  7. 【MFC】带背景的工具栏
  8. 在关于测试高速光纤链路的BICSI会前研讨会上获得3个CEC
  9. Java开发人员的5种工具
  10. 局域主机做服务器,安装DNN,外网访问的解决办法
  11. 【转】GPS从入门到放弃(一) --- GPS基础原理
  12. 还看不懂同事的代码?Lambda 表达式、函数接口了解一下
  13. 电脑突然无法播放html音频,电脑无法播放音频怎么办
  14. Linux下Zend Framework的“Invalid Controller Specified”问题
  15. mysql 所有外键_mysql中的外键
  16. elcipse 编译cocos2d-x android
  17. C语言ftell()函数
  18. 适合 Java 新手的开源项目集合——在 GitHub 学编程
  19. oracle sqlldr原理,oracle sqlldr 参数说明
  20. as常用固定搭配_常用的有以下固定搭配

热门文章

  1. 软考-嵌入式系统设计师:[网络安全:笔记(六)]
  2. Unity3D——学习分享(一) 游戏开发
  3. 嵌入式系统硬件体系设计(一)
  4. 解决方法数超65536(java.lang.IllegalArgumentException: method ID not in [0, 0xffff]: 65536)
  5. 永磁同步电机PMSM,异步电机仿真矢量控制
  6. 大数据在医疗行业中的5种应用
  7. 计算机网络第七版 谢希仁 3-33答案
  8. 如何去除图片中的白色背景(变透明)
  9. 32位系统装8g内存条?能用吗
  10. 计算机科学与技术8G够,高手们.请问8G物理内存设置多少虚拟内存适合