先看看演示视频吧
????????个人博客管理系统采用Springboot2.4.5框架开发,是标准的MVC模式,将这个系统划分为View层、Controller层、Service层、DAO层和持久层五层。其中,Spring MVC负责请求的转发和视图管理,Spring实现业务对象管理,MyBatis-Plus作为数据对象的持久化引擎。系统结构图如图所示。
该系统主要分为前台用户界面和后台管理界面两个核心部分,以适应不同用户群体的功能需求。
项目整体功能需求如图 1-1所示:
个人博客管理系统功能模块图如图所示:
????????maven依赖用idea自动导一下就行,应该没什么大问题
????????下面将一下怎么使用吧,首先我们要创建一个名为blog的数据库,再导入下面的sql语句。
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_blog
-- ----------------------------
DROP TABLE IF EXISTS `t_blog`;
CREATE TABLE `t_blog` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',
`content` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容',
`first_picture` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '首图',
`flag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标记',
`views` int(11) NULL DEFAULT NULL COMMENT '浏览次数',
`appreciation` tinyint(1) NOT NULL DEFAULT 0 COMMENT '赞赏',
`share_statement` tinyint(1) NOT NULL DEFAULT 0 COMMENT '转载声明',
`commentabled` tinyint(1) NOT NULL DEFAULT 0 COMMENT '评论',
`published` tinyint(1) NOT NULL DEFAULT 0 COMMENT '发布',
`recommend` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推荐',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`type_id` bigint(20) NULL DEFAULT NULL COMMENT '分类id',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT '拥有者id',
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '文章描述',
`tag_ids` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of t_blog
-- ----------------------------
INSERT INTO `t_blog` VALUES (1, '3', '# 3', '11', '', 11, 0, 0, 0, 0, 0, '2023-12-25 09:48:24', '2023-12-25 09:48:24', 1, 0, '111', '1');
INSERT INTO `t_blog` VALUES (2, '答辩演示', '# Markdown文档样例\r\n\r\n## 目录\r\n\r\n- [标题](#标题)\r\n- [文本格式化](#文本格式化)\r\n- [链接](#链接)\r\n- [列表](#列表)\r\n- [引用](#引用)\r\n- [代码块](#代码块)\r\n- [插入图像](#插入图像)\r\n\r\n## 标题\r\n\r\nMarkdown中使用`#`符号来表示标题,`#`的数量表示标题的级别。\r\n\r\n# 一级标题\r\n## 二级标题\r\n### 三级标题\r\n[链接文本]()\r\n\r\n列表\r\n- 无序列表项 1\r\n- 无序列表项 2\r\n - 嵌套的无序列表项\r\n\r\n\r\n![壁纸](https://inews.gtimg.com/newsapp_bt/0/13956121885/641)\r\n\r\n代码块\r\n```python\r\ndef hello_world():\r\nprint(\"Hello, World!\")\r\n```\r\n\r\n行代码\r\n`print(\"Hello, World!\")`\r\n\r\n\r\n\r\n', 'https://img0.baidu.com/it/u=2789195095,3243697354&fm=253&fmt=auto&app=138&f=JPEG?w=400&h=300', '', 2, 0, 0, 0, 1, 0, '2023-12-26 16:43:57', '2023-12-26 16:51:00', 1, 0, '答辩文档', '1');
-- ----------------------------
-- Table structure for t_blog_tags
-- ----------------------------
DROP TABLE IF EXISTS `t_blog_tags`;
CREATE TABLE `t_blog_tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_id` bigint(20) NULL DEFAULT NULL,
`blog_id` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_tag_id`(`tag_id`) USING BTREE,
INDEX `fk_blog_id`(`blog_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of t_blog_tags
-- ----------------------------
INSERT INTO `t_blog_tags` VALUES (1, 1, 1);
INSERT INTO `t_blog_tags` VALUES (2, 1, 2);
INSERT INTO `t_blog_tags` VALUES (4, 1, 3);
INSERT INTO `t_blog_tags` VALUES (8, 1, 4);
-- ----------------------------
-- Table structure for t_comment
-- ----------------------------
DROP TABLE IF EXISTS `t_comment`;
CREATE TABLE `t_comment` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nickname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
`content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '内容',
`avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`blog_id` bigint(20) NULL DEFAULT NULL COMMENT '所属博客id',
`parent_comment_id` bigint(20) NULL DEFAULT NULL COMMENT '父评论id',
`admin_comment` tinyint(1) NULL DEFAULT NULL COMMENT '管理员评论',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of t_comment
-- ----------------------------
INSERT INTO `t_comment` VALUES (1, '111', '111', '悟解', '/images/avatar.jpg', '2023-12-26 00:44:52', 3, -1, 0);
INSERT INTO `t_comment` VALUES (2, 'lyk', 'liyankang@aliyun.com', '悟解', '/images/avatar.jpg', '2023-12-26 14:10:16', 3, -1, 0);
INSERT INTO `t_comment` VALUES (3, 'lyk', 'liyankang@aliyun.com', '呜呜呜', '/images/avatar.jpg', '2023-12-26 14:16:35', 3, -1, 0);
INSERT INTO `t_comment` VALUES (4, 'lyk', 'liyankang@aliyun.com', '我是来测试评论的', '/images/avatar.jpg', '2023-12-26 16:56:27', 2, -1, 0);
-- ----------------------------
-- Table structure for t_tag
-- ----------------------------
DROP TABLE IF EXISTS `t_tag`;
CREATE TABLE `t_tag` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签名',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of t_tag
-- ----------------------------
INSERT INTO `t_tag` VALUES (1, 'python');
-- ----------------------------
-- Table structure for t_type
-- ----------------------------
DROP TABLE IF EXISTS `t_type`;
CREATE TABLE `t_type` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类名',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of t_type
-- ----------------------------
INSERT INTO `t_type` VALUES (1, '我的');
-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nickname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '新用户' COMMENT '昵称',
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '密码',
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
`avatar` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
`type` int(11) NULL DEFAULT NULL COMMENT '权限',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of t_user
-- ----------------------------
INSERT INTO `t_user` VALUES (0, '悟解', 'LiYanKang', 'a448410bdcbb4d7cfb32830909f6aa08', 'lyk2zmy@163.com', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F201811%2F07%2F20181107103350_V8nTe.thumb.1000_0.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1706173075&t=ff98d36f75f41fe74f413987a18b13eb', 1, '2023-12-26 21:55:53', '2023-12-27 21:56:01');
INSERT INTO `t_user` VALUES (1, '悟解', 'lyk', '123456', 'liyankang@aliyun.com', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F201811%2F07%2F20181107103350_V8nTe.thumb.1000_0.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1706173075&t=ff98d36f75f41fe74f413987a18b13eb', NULL, NULL, NULL);
SET FOREIGN_KEY_CHECKS = 1;
导入完成后应该有以下的表结构如下:
修改数据库账号密码(一共要修改4处哦):
关于代码
? ? ? ? 我想了一下,还是私信吧,算了我这里也放一个链接:
关于课设报告文档
????????由于只是提供学习,不放置课设报告了哦,我的报告写了大概1w+字,要借鉴的也行,但是报告还是推荐自己写哦,由于是多人合作,我这里的报告分为admin端版本和web端版本,我本人的是admin端的版本,web端是我的室友在写。
关于人脸识别
? ? ? ? 这里我只是调了一个华为云的接口,目前只可以识别我一个人,无法识别别人,感兴趣的同学可以了解一下,等你把接口配置好了,就只需要改一部分代码就好了。如果不会调接口的话,我看看评论吧,如果大家想要看,我也可以出一篇调接口的。