{"id":19755743,"url":"https://github.com/iszhouhua/blog","last_synced_at":"2025-04-05T08:03:42.266Z","repository":{"id":40002980,"uuid":"163003493","full_name":"iszhouhua/blog","owner":"iszhouhua","description":"基于SpringBoot搭建的开源个人博客系统，模板引擎使用thymeleaf。项目后台部分采用前后端分离模式开发。前台使用 vue 和 element完成。","archived":false,"fork":false,"pushed_at":"2024-06-30T06:33:43.000Z","size":25942,"stargazers_count":411,"open_issues_count":1,"forks_count":103,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T07:01:38.844Z","etag":null,"topics":["blog","java","spring-boot","vue"],"latest_commit_sha":null,"homepage":"https://www.iszhouhua.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iszhouhua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-12-24T15:30:54.000Z","updated_at":"2025-03-29T05:04:22.000Z","dependencies_parsed_at":"2024-04-23T13:23:25.562Z","dependency_job_id":"e0b4ae1f-ca46-487c-85b3-347c3cabcc0b","html_url":"https://github.com/iszhouhua/blog","commit_stats":null,"previous_names":["im-andy/blog","iszhouhua/blog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iszhouhua%2Fblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iszhouhua%2Fblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iszhouhua%2Fblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iszhouhua%2Fblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iszhouhua","download_url":"https://codeload.github.com/iszhouhua/blog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305919,"owners_count":20917204,"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","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":["blog","java","spring-boot","vue"],"created_at":"2024-11-12T03:12:58.686Z","updated_at":"2025-04-05T08:03:42.233Z","avatar_url":"https://github.com/iszhouhua.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"简介\n----\n\n基于[SpringBoot](https://github.com/spring-projects/spring-boot)\n搭建的开源个人博客系统，前台界面基于Hexo主题[hexo-theme-gal](https://github.com/ZEROKISEKI/hexo-theme-gal)\n进行修改，管理后台界面基于[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)进行修改。\n\n技术栈：SpringBoot、Thymeleaf、MySQL、MyBatis-Plus、Lombok、Gson、caffeine、validation、Bootstrap、jQuery、FontAwesome、Jsoup……\n\n博客运行效果示例：[https://www.iszhouhua.com](https://www.iszhouhua.com)\n\n## Docker\n\n对于不想自己配置代码运行环境（Java和Node）的同学，可以使用此方式一键运行，部署属于自己的博客。\n\n请先参照 [⚙️配置文件](src/main/resources/application.yml) 相关说明，配置好你自己的 `application.yml` 文件，然后使用以下命令启动 docker：\n\n```shell\n# 拉取镜像\ndocker pull iszhouhua/blog:latest\n# 运行镜像\ndocker run -d --name blog -p 8080:8080 -v $(pwd)/logs:/app/logs -v $(pwd)/upload:/app/upload -v $(pwd)/application.yml:/config/application.yml iszhouhua/blog:latest\n```\n\n如果镜像拉取不下来，可以从阿里云镜像仓库中进行拉取，将`iszhouhua/blog`改为`registry.cn-shenzhen.aliyuncs.com/iszhouhua/blog`即可\n\n注意：在 Windows 终端下需要将配置文件路径 `$(pwd)` 替换为绝对路径。\n\n挂载目录的解释见[docker部署](#docker部署)\n\n## 快速开始\n\n1. 下载本项目，并使用IDE打开\n2. 在mysql中新建数据库`blog`\n   \u003e 现在运行项目会自动运行SQL脚本建表和插入初始数据\n3. 修改`application-dev.yml`中的数据库配置信息\n4. 运行`BlogApplication.java`，启动项目\n5. 浏览器访问`http://127.0.0.1:8080/`\n   \u003e 使用 Idea，Eclipse 等IDE运行需要安装Lombok插件，JDK版本要求1.8+\n\n\n### 管理管理\n\n管理后台采用前后端分离的方式实现，源码位于[vue](vue)文件夹下，如何运行方式见[vue/README.md](vue/README.md)\n\n部署\n----\n\n### jar部署\n\n配置好`application-prod.yml`中的配置信息，然后打包：\n\n```bash\nmvn clean package -Dmaven.test.skip=true\n```\n\n将打包好的`blog.jar`和`blog.sh`放到同一文件夹下，执行命令：\n\n```bash\n# 使脚本具有执行权限\nchmod +x ./blog.sh\n# 启动项目\n./blog.sh start\n# 或者直接使用sh命令运行脚本\nsh blog.sh start\n```\n\n### tomcat部署\n\n修改`application.yml`中`spring.profiles.active`为`prod`，并配置好`application-prod.yml`中的配置信息。\n\n直接修改`pom.xml`中的打包方式为war后进行打包，或直接运行命令：\n\n```bash\nclean package war:war -Dmaven.test.skip=true\n```\n\n然后将打包好的`blog.war`丢进tomcat中运行即可！\n\n### docker部署\n\n配置好`application-prod.yml`中的配置信息，然后执行`build-docker.sh`：\n\n```bash\n# docker打包\nsh build-docker.sh\n# 新建挂载目录\nmkdir logs upload\n# 运行项目\ndocker run -d --name blog -p 8080:8080 -v $(pwd)/logs:/app/logs -v $(pwd)/upload:/app/upload -v $(pwd)/application.yml:/config/application.yml blog\n```\n\n- -v $(pwd)/application.yml:/config/application.yml: 挂载配置文件，`$(pwd)/application.yml`为你的配置文件所在目录\n- -v $(pwd)/logs:/app/logs: 挂载日志文件，不关心日志可不进行挂载\n- -v $(pwd)/upload:/app/upload 上传图片挂载，非本地存储无需挂载\n\n\u003e 注：build-docker.sh脚本会自动将vue代码也编译进docker镜像中，无需单独处理vue的内容\n------\n\n## 交流群\n\n### QQ群\n\n![QQ群二维码](images/qq_group_chat.jpg)\n\n------\n\n## 界面展示\n\n![1557279251039](images/20190508093436.png)\n\n![20190508095012](images/20190508095012.png)\n\n![20190508095714](images/20190508095714.png)\n\n![20190508101138](images/20190508101138.png)\n\n![20190508101254](images/20190508101254.png)\n\n![20190508101400](images/20190508101400.png)\n\n![20190508101440](images/20190508101440.png)\n\n![20190508101544](images/20190508101544.png)\n\n![20190508101622](images/20190508101622.png)\n\n## 2019.5.1\n\n添加规则管理，转载文章时可直接根据规则自动装配内容。\n\n## 2019.5.8\n\n添加云存储支持，包括七牛云、阿里云、腾讯云。\n\n## 2019.11.5\n\n加入记住密码功能\n\n## 2020.3.5\n\n修改数据库脚本，改为运行时自动运行脚本，方便后续修改数据库结构\n\n## 2020.3.18\n\n修改日志记录，修复无法评论的bug\n\n## 2020.5.27\n\n缓存改用caffeine\n\n## 2020.9.4\n\n很久没看，发现网站被脚本搞挂了。这次改了很多东西，把评论、用户模块重做了一遍。\n\n## 2020.9.10\n\n增加当前登录用户参数注入，修复一些上次改动引起的bug\n\n## 2020.11.28\n\n修复文件流未关闭引起的Too many open files问题\n\n## 2021.4.15\n\n使用flyway进行数据库版本管理，抛弃掉之前的初始化方法\n\n## 2021.6.13\n\n加入获取邮箱验证码功能，支持Gitee和GitHub登录\n\n## 2022.6.26\n\n- 升级ip2region\n- 修改日志记录\n- 修复首次运行出错问题\n- docker部署方式修改\n\n## 2024.6.30\n\n简化本地上传，完善docker部署\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiszhouhua%2Fblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiszhouhua%2Fblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiszhouhua%2Fblog/lists"}