{"id":24738290,"url":"https://github.com/caolib/book_management_system","last_synced_at":"2025-10-10T07:32:32.776Z","repository":{"id":216956782,"uuid":"740280124","full_name":"caolib/book_management_system","owner":"caolib","description":"Java课程设计，图书借阅管理系统，springboot+vue3前后端分离开发","archived":false,"fork":false,"pushed_at":"2025-01-05T10:07:47.000Z","size":143,"stargazers_count":30,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T17:52:49.579Z","etag":null,"topics":["java","mybatis-plus","mysql","redis","springboot"],"latest_commit_sha":null,"homepage":"https://caolib-book.apifox.cn","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caolib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://bin-sites.pages.dev/sponsor/"]}},"created_at":"2024-01-08T02:33:40.000Z","updated_at":"2025-02-07T15:15:53.000Z","dependencies_parsed_at":"2024-01-22T12:38:43.501Z","dependency_job_id":"3b501609-03b6-4f95-bd93-f842f708eb12","html_url":"https://github.com/caolib/book_management_system","commit_stats":null,"previous_names":["tankingcao/java_design","caolib/java_design"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/caolib/book_management_system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolib%2Fbook_management_system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolib%2Fbook_management_system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolib%2Fbook_management_system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolib%2Fbook_management_system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caolib","download_url":"https://codeload.github.com/caolib/book_management_system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolib%2Fbook_management_system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003189,"owners_count":26083533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","mybatis-plus","mysql","redis","springboot"],"created_at":"2025-01-27T22:35:55.089Z","updated_at":"2025-10-10T07:32:32.449Z","avatar_url":"https://github.com/caolib.png","language":"Java","funding_links":["https://bin-sites.pages.dev/sponsor/"],"categories":[],"sub_categories":[],"readme":"[![Typing SVG](https://readme-typing-svg.herokuapp.com?font=cascadia+code\u0026size=38\u0026duration=3500\u0026pause=1000\u0026color=00ADFF\u0026center=true\u0026vCenter=true\u0026random=false\u0026width=1000\u0026height=100\u0026lines=Book+lending+management+system;图书借阅管理系统)](https://git.io/typing-svg)\n\n\u0026emsp;\u0026emsp;\n\n![springboot](https://img.shields.io/badge/springboot-v3.0.9-%236DB33F?style=flat\u0026logo=springboot\u0026logoColor=236DB33F\u0026labelColor=white)\n![maven](https://img.shields.io/badge/Maven-v3.9.5-blue?style=flat\u0026logo=apachemaven\u0026logoColor=red\u0026labelColor=white)\n![mybatisplus](https://img.shields.io/badge/MybatisPlus-v3.5.3.1-red?style=flat\u0026labelColor=white)\n![mysql](https://img.shields.io/badge/MySQL-v8.2.0-blue?style=flat\u0026logo=mysql\u0026logoColor=blue\u0026labelColor=white)\n![redis](https://img.shields.io/badge/Redis-v7.0.12-red?style=flat\u0026logo=redis\u0026logoColor=%23DC382D\u0026labelColor=white)\n![GitHub Release](https://img.shields.io/github/v/release/tankingcao/java_design?include_prereleases\u0026sort=date\u0026display_name=release\u0026style=flat\u0026labelColor=red\u0026cacheSeconds=3600)\n![下载量](https://img.shields.io/github/downloads/caolib/book_management_system/total.svg)\n\n\n使用`springboot+mybatis-plus`框架制作的一个简单的图书借阅管理系统后台服务器\n\n\u003e [!important]\n\u003e\n\u003e **项目采用前后端分离开发，这是后端项目，对应的[前端项目地址](https://github.com/caolib/vue3-vite)，注意相关技术栈版本不要相差太大**\n\n\u003e [!caution]\n\u003e\n\u003e - **最近更新中因为使用`redis`二次校验token实现token主动过期，`redis`变成必需项!!!**\n\u003e - **在[发行版](https://github.com/caolib/book_management_system/releases)的资源中有此项目对应的数据库结构的`sql`文件**\n\n\u003e [!tip]\n\u003e - 使用前先使用maven下载相关依赖，建议使用IDEA编译器，捆绑了maven，可以直接使用\n\u003e - 注意前后端一般是同时修改的，必须匹配版本，没有特别需求直接使用最新的\n\n## 使用IDEA快速开发\n\n如果你使用IDEA开发，可以按照以下步骤快速进行使用，你也可以在[**我的网站**](https://bin-sites.pages.dev/book)查看下面教程\n\n### 后端项目\n\n\u003e [!WARNING]\n\u003e\n\u003e 如果你没有安装git，可以手动下载[项目压缩包](https://github.com/caolib/book_management_system/archive/refs/heads/master.zip)然后解压后用IDEA打开\n\n1. 复制项目地址\n\n```bash\ngit@github.com:caolib/book_management_system.git\n```\n\n2. 打开IDEA，点击右上角**从VCS获取**，粘贴项目地址，选取一个合适的目录，然后点击克隆\n\n\u003cimg src=\"https://s2.loli.net/2024/12/30/fm7o3L4EDTVQZAR.png\" alt=\"image-20241230113626675\" style=\"zoom: 50%;\" /\u003e\n\n#### 设置Maven\n\n项目打开后先**打开设置**检查maven配置是否正确，如果你没有自己额外下载maven，可以使用IDEA捆绑的maven\n\n\u003cimg src=\"https://s2.loli.net/2024/12/30/bcy9G1Bo6qKnwWL.png\" alt=\"image-20241230115029577\" style=\"zoom:67%;\" /\u003e\n\n设置好后打开maven窗口刷新，无报错则成功导入依赖\n\n![image-20241230115352158](https://s2.loli.net/2024/12/30/FlNtrXiGqSzLTC3.png)\n\n#### 设置Java版本\n\n在文件选项，点击项目结构\n\n![image-20241230115812170](https://s2.loli.net/2024/12/30/78ZGtsJQ1uWwiqD.png)\n\n本项目使用Java17，没有安装可以下载一个\n\n![image-20241230115937252](https://s2.loli.net/2024/12/30/ct17Yg49obIqdf5.png)\n\n#### 启动项目\n\n这些都无误就可以启动项目了\n\n![image-20241230120342131](https://s2.loli.net/2024/12/30/CnyfmkMYhcbjgzO.png)\n\n#### 配置数据库\n\n##### Mysql配置\n\n###### 连接数据库\n\n1. 先下载sql文件，[Releases · caolib/book_management_system](https://github.com/caolib/book_management_system/releases)\n2. 创建一个mysql数据源\n\n![image-20241230120647502](https://s2.loli.net/2024/12/30/jJfCoGuQl8zdXKt.png)\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e 1. 主机：你的mysql数据库地址，如果安装在本地，直接填localhost，如果安装在虚拟机上可以先使用`ip addr`命令查看虚拟机地址，然后填写虚拟机地址（注意，如果虚拟机重启，这个地址大概率会变化）\n\u003e\n\u003e ![image-20241230121438535](https://s2.loli.net/2024/12/30/ojKx2nCA1gmJeZ3.png)\n\u003e\n\u003e 2. 端口：如果没修改过，默认是3306\n\u003e\n\u003e \u003e [!caution]\n\u003e \u003e\n\u003e \u003e 如果在虚拟机上，需要开放防火墙端口这里顺便打开了redis的端口6379\n\u003e \u003e\n\u003e \u003e ```bash\n\u003e \u003e sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent\n\u003e \u003e sudo firewall-cmd --zone=public --add-port=6379/tcp --permanent\n\u003e \u003e ```\n\u003e\n\u003e 3. 用户名，密码：按照自己设置的填写就可以\n\u003e 4. 点击测试连接，成功后点击确定\n\n\n\n![image-20241230120920597](https://s2.loli.net/2024/12/30/Fjw8QLcZ1eT4zMb.png)\n\n###### 导入数据库\n\n右键刚创建的数据源，选择运行sql脚本，然后选择下载的sql文件就可以了\n\n![image-20241230123701850](https://s2.loli.net/2024/12/30/iIlEFJ1D5P89eaX.png)\n\n导入后，选择`java_design`架构就可以看到导入的表了，**应该是有四张表和一个视图**\n\n##### Redis配置\n\n###### 连接数据库\n\n同样创建一个redis数据源\n\n![image-20241230124300262](https://s2.loli.net/2024/12/30/IvGRhDyglKxbPqM.png)\n\nredis默认没有密码，只需要填写主机号，同mysql，然后点击测试连接，成功后点击确定\n\n![image-20241230124346981](https://s2.loli.net/2024/12/30/UsvGWhiOnxAdpuP.png)\n\n#### 修改配置文件\n\n打开`application-dev.yml`文件，修改host（主机），用户名、密码等，修改后重启项目\n\n![image-20241230130628980](https://s2.loli.net/2024/12/30/jQ63Re19UYduLPM.png)\n\n#### 测试接口\n\n项目的[API](https://app.apifox.com/project/5694188)，测试相应接口\n\n![image-20241230134927055](https://s2.loli.net/2024/12/30/kcLVWdvb7loOeYA.png)\n\n### [前端项目](https://github.com/caolib/vue3-vite)\n\n#### 克隆项目\n\n下载或clone到本地，这里使用VSCode打开(随便用什么打开都行)\n\n#### 检查配置\n\n打开`vite.config.js`文件,查看后端服务地址，默认是本地8080，如果无误则无需修改\n\n```js\n  server: {\n    host: \"localhost\",\n    port: 5173,\n    proxy: {\n      \"/api\": {\n        target: \"http://localhost:8080\", //后端服务地址\n        changeOrigin: true,\n        rewrite: (path) =\u003e path.replace(/^\\/api/, \"\"),\n      },\n    },\n  }\n```\n\n#### 安装依赖\n\n打开控制台，运行`npm install`，如果报错，可以以管理员方式打开控制台再运行\n\n\u003e [!CAUTION]\n\u003e\n\u003e 使用npm需要安装Nodejs，版本不要太低，18.x和20.x都可以\n\n```sh\nnpm install\n```\n\n#### 启动项目\n\n```sh\nnpm run dev\n```\n\n默认运行在`http://localhost:5173`，账号和密码可以在mysql表中查看\n\n---\n\n\n### 关于\n\n\u003cimg align='right' src=\"https://s2.loli.net/2024/12/30/qPgJilDEutcjFCO.png\" /\u003e❓ 有问题可以在[Issues](https://github.com/caolib/book_management_system/issues)提问\n\n⭐ 如果对你有帮助的话请点个star\n\n☕ 请我 [喝杯咖啡](https://bin-sites.pages.dev/sponsor/)\n\n📧 联系我 [1265501579@qq.com](mailto:1265501579@qq.com)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaolib%2Fbook_management_system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaolib%2Fbook_management_system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaolib%2Fbook_management_system/lists"}