{"id":19416193,"url":"https://github.com/htangle/nevergetmeweb","last_synced_at":"2025-04-24T13:32:35.425Z","repository":{"id":41043660,"uuid":"173303148","full_name":"hTangle/NeverGetMeWeb","owner":"hTangle","description":"使用SpringBoot+MySQL+Redis+jQuery+Bootstrap搭建的个人博客项目---废弃","archived":false,"fork":false,"pushed_at":"2023-11-28T20:57:34.000Z","size":62216,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-17T01:40:31.630Z","etag":null,"topics":["bootstrap4","java","mybatis","mysql","redis","springboot"],"latest_commit_sha":null,"homepage":"https://www.ahsup.top/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hTangle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-01T13:05:06.000Z","updated_at":"2024-04-17T01:40:31.630Z","dependencies_parsed_at":"2023-01-19T18:03:38.837Z","dependency_job_id":null,"html_url":"https://github.com/hTangle/NeverGetMeWeb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hTangle%2FNeverGetMeWeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hTangle%2FNeverGetMeWeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hTangle%2FNeverGetMeWeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hTangle%2FNeverGetMeWeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hTangle","download_url":"https://codeload.github.com/hTangle/NeverGetMeWeb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223954919,"owners_count":17231187,"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":["bootstrap4","java","mybatis","mysql","redis","springboot"],"created_at":"2024-11-10T12:46:48.920Z","updated_at":"2024-11-10T12:46:49.599Z","avatar_url":"https://github.com/hTangle.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NeverGetMeWeb\n博客主页[https://www.nevergetme.com/](https://www.nevergetme.com/)\n\n__博客采用的技术__：\n\n 1. Web框架：Springboot\n 2. 数据库ORM：[MyBatis](https://blog.mybatis.org/)\n 3. 分页插件：[PageHelper](https://pagehelper.github.io/)\n 4. 数据库：MySQL\n 5. 缓存：[Redis](https://redis.io/)\n 6. 前端模板：[Thymeleaf](https://www.thymeleaf.org/)\n 7. 前端：[Bootstrap](https://getbootstrap.com/)\n 8. 文章编辑与展示：[Editor.md](https://pandao.github.io/editor.md/examples/full.html)\n 9. 数据展示：[echarts](https://echarts.baidu.com/)\n 10. 项目构建：Maven\n 11. 项目部署：Docker\n 12. 鉴权：~~Spring Security(Disabled)~~\n 13. [词云图](https://github.com/ecomfe/echarts-wordcloud)\n 14. [Image Viewer](https://github.com/fengyuanchen/jquery-viewer)\n \n__使用的服务器__: 阿里云的学生服务器，1核2G内存1M带宽\n\n__目前实现的功能__：\n\n* 用户邮箱注册\n* 博客列表展示\n* 按照标签分类\n* 查看统计数据\n* 简单后台管理\n* markdown语法编辑博客\n* 搜索记录词云图展示\n* 后台通过Websocket推送消息\n\n__部署方式__:使用Maven打包成jar然后通过Docker部署\n\nDockerfile\n```\nFROM java:8\nMAINTAINER hzw\nADD app.jar /home/app.jar\nENTRYPOINT [\"java\",\"-jar\",\"/home/app.jar\"]\n```\nrun.sh\n```\n#!/bin/bash\nrm app.jar\nmv never*.jar app.jar\ndocker stop myapps\ndocker rm myapps\ndocker build -t wisely/myapps .\ndocker run -d --name myapps -v /home/image:/home/img -p 8080:8080 wisely/myapps \n```\n通过rz命令将jar文件复制到该文件夹，然后通过执行 run.sh即可完成部署\n* 需要给run.sh执行权限\n* mv never*.jar app.jar 按需更改\n\n## 页面展示\n* 首页\n  ![](./pic/20190522100555.png)\n* 文章编辑界面\n  ![](./pic/20190522101124.png)\n* 统计界面\n  ![](./pic/20190522101147.png)\n* 后台管理界面\n  ![](./pic/20190522101225.png)\n* 搜索界面\n  ![](./pic/20190523211448.png)\n## MySQL建表\n* 用户表\n```sql\nCREATE TABLE `user` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `user_uuid` varchar(70) DEFAULT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `password` varchar(255) DEFAULT NULL,\n  `email` varchar(255) DEFAULT NULL,\n  `telephone` varchar(255) DEFAULT NULL,\n  `role` int(10) DEFAULT NULL,\n  `image` varchar(255) DEFAULT NULL,\n  `last_ip` varchar(255) DEFAULT NULL,\n  `last_time` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`) USING BTREE\n) ENGINE=InnoDB AUTO_INCREMENT=10005 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT\n```\n__role为10时表示用户是管理员，可以发表文章，查看管理界面，进行管理操作等__\n\n* 文章表\n```sql\nCREATE TABLE `article` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `authorId` int(11) NOT NULL,\n  `title` varchar(255) NOT NULL,\n  `content` longtext NOT NULL,\n  `publishDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  `updateDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  `likes` int(11) NOT NULL DEFAULT '0',\n  `shortcut` varchar(255) DEFAULT NULL,\n  `visitTimes` int(11) NOT NULL DEFAULT '0',\n  `isOriginal` int(1) NOT NULL DEFAULT '0',\n  `isStick` tinyint(1) NOT NULL DEFAULT '0',\n  `cover` varchar(100) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=100042 DEFAULT CHARSET=utf8\n```\n* 评论表\n```sql\nCREATE TABLE `ArticleComments` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `commentUserId` int(11) NOT NULL,\n  `articleId` int(11) NOT NULL,\n  `content` varchar(400) NOT NULL,\n  `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8\n```\n* 回复表\n```sql\nCREATE TABLE `ReplyComment` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `articleId` int(11) NOT NULL,\n  `commentId` int(11) NOT NULL,\n  `replyUserId` int(11) NOT NULL,\n  `repliedUserId` int(11) NOT NULL,\n  `content` varchar(200) NOT NULL,\n  `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8\n```\n* 标签表\n```sql\nCREATE TABLE `tags` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `value` varchar(100) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=10006 DEFAULT CHARSET=utf8\n```\n* 文章标签表\n```sql\nCREATE TABLE `articleTags` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `tagid` int(11) NOT NULL,\n  `articleid` int(11) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8\n```\n* 访问记录表\n```sql\nCREATE TABLE `PageView` (\n  `id` int(10) NOT NULL AUTO_INCREMENT,\n  `visitTime` date NOT NULL,\n  `pv` int(11) NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `visitTime` (`visitTime`)\n) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=latin1\n```\n* 搜索记录表\n```sql\nCREATE TABLE `searchhistory` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `content` varchar(200) NOT NULL,\n  `times` int(11) NOT NULL DEFAULT '1',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `content` (`content`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\n```\n* 系统通知表\n```sql\nCREATE TABLE `SystemMessage` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `receiver` int(11) NOT NULL,\n  `content` varchar(255) NOT NULL,\n  `sendState` tinyint(1) NOT NULL,\n  `readState` tinyint(1) NOT NULL,\n  `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  `type` int(2) NOT NULL,\n  `url` int(11) NOT NULL DEFAULT '0',\n  `sender` int(11) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8\n```\n\n## 项目目录\n- java\n  - bean\n    - Article\n    - ArticleComment\n    - PublishDateStatistical\n    - ReplyComment\n    - Tags\n    - User\n    - Visitor\n  - config\n    - RedisWebSecurityConfig：拦截器\n    - StaticConfigParam：静态参数\n  - controller\n    - MainController：返回Thymeleaf的模板控制类\n  - interceptor\n    - RedisSessionInterceptor：控制其他权限\n    - RedisSessionRoleInterceptor：控制管理员权限\n  - mapper\n    - ArticleCommentMapper\n    - ArticleMapper\n    - ReplyCommentMapper\n    - StatisticsMapper\n    - UserMapper\n  - restcontroller：处理post，get请求，返回json数据\n    - AdminRestController\n    - ArticleRestController\n    - CommentRestController\n    - UserRestController\n  - service\n    - impl\n      - ArticleCommentServiceImpl\n      - ArticleServiceImpl\n      - ReplyCommentServiceImpl\n      - SendEmailServiceImpl\n      - StatisticsServiceImpl\n      - UserServiceImpl\n    - ArticleCommentService\n    - ArticleService\n    - ReplyCommentService\n    - SendEmailService\n    - StatisticsService\n    - UserService\n  - utility\n    - ContentUtility:一些静态函数\n- resources\n  - mapper: MyBatis的Mapper\n    - ArticleCommentMapper.xml\n    - ArticlesMapper.xml\n    - ReplyCommentMapper.xml\n    - StatisticsMapper.xml\n    - UserMapper.xml\n  - static: 静态文件\n  - templates: Thymeleaf模板\n  - application.properties:公共properties，包含了Email的相关参数\n  - application-dev.properties:测试环境\n  - application-prod.properties:生产环境\n\n## 已知BUG\n* 词云图如果词汇变大会放不下,官方解释如下\n  \u003e The current implementation will skip the word that can't be fit into the canvas. This is a faulty design and should be corrected. It can be fixed by laying out the words on a boundless virtual canvas, and scale the entire virtual canvas until it fits into the visual canvas. The project, however, is not trivial.\n\n\n## 更新2019-05-15\n* 需要增加通过标签读取文章的功能\n\n## 更新 2019-05-07\n* 新增了评论功能\n\n## 更新 2019-05-03\n* 新增了注册界面\n* 能够通过邮箱注册\n\n## 更新 2019-05-02\n* 更改了container样式，能够显示阴影\n* 更改了header和footer的颜色\n* 增加了标签内容\n* 修改了博文其他信息的显示方式\n* 修复了不能够连续ctrl+v上传图片的bug\n* 可用通过https访问网站\n\n## 更新2019-05-01\n* 去掉Spring Security，使用HttpSession\n## 更新2019-04-30\n* 将head和footer分离\n* 引入redis缓存：\n  * 缓存每一篇文章，首先从缓存中读取，如果缓存中没有\n  * 则从数据库中读取并加入缓存\n  * 如果新建文章，则更新缓存\n* 使用docker部署\n\n## 更新 2019-04-29\n* 增加了已读数功能\n* 增加了页脚footer\n* 如果当前文章数少于5则将页脚固定在页面底部，大于等于5固定在容器底部\n* 增加了一些新的图标：日期，喜欢，阅读数\n* 更改了文章的排序方法，安装id倒序\n* 增加了分页插件\n* 增加了Ctrl+V上传图片功能\n* 增加Spring Security认证\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtangle%2Fnevergetmeweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhtangle%2Fnevergetmeweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtangle%2Fnevergetmeweb/lists"}