本项目由本人原创,仅供学习交流,由于本人是一个JAVA后端工程师,所以前端写的很菜,大佬勿喷。
注:因为项目环境较大,本人资金有限,自己的服务器只能跑起来一部分服务,所以借用了盆友的服务器,如果访问不到,那么就是我盆友给我停了,各位大佬可以自己搭建环境跑一下
注:这里之所以要单独展示是因为上线后,因为环境原因,这个粒子效果没有了,我懒得调了,所以截个图
首页粒子效果展示视频
功能展示
1.博文功能:编写博客,修改博客,ES高亮搜索,个人博客主页,集成了Elasticsearch集群
2.聊天:消息的发送,接收,私聊,群聊,创建群聊,添加好友,好友验证,仿微信PC端实时刷新消息列表,集成了WebScoket
3.留言:发送留言,查看留言列表,集成RabbitMQ
4.用户管理:登录,注册
大于4核8G
,因为本人的4核G就只能够搭建环境无法部署项目,最后使用了两台服务器注:也可以多机部署,或者将集群配置降低为单机版
前端:
Vue 2.0
HTML
CSS
ElementUI
后端:
SpringCloud Alibaba 2.2.6.RELEASE
Nacos 2.0.3
集群3台主机
Sentinel 1.81
Seata 1.3.0
SpringCloud Hoxton.SR12
OpenFeign 2.2.9RELEASE
Gateway 2.2.9RELEASE
SpringBoot 2.3.12.RELEASE
MySQL 5.7
Mybatis Plus 3.4.3.4
Redis 3.2.1
Nginx 1.21.1
RabbitMQ 3.8.12
Elasticsearch 7.8.0
集群3台主机
WebSocket 2.4.13
JWT
JDK 1.8
Docker
环境搭建及框架学习
Mybatis-plus初识
SpringCloud
SpringCloudAlibaba
Vue
Docker入门
Docker下安装mysql超详细步骤
Docker下安装Redis超详细步骤
Docker中部署SpringBoot项目
docker中搭建Nacos2.0.3集群并使用mysql存储数据
IDE搭建微服务项目
docker中搭建sentinel-1.8.1并将sentinel上配置的规则持久化到Nacos
Elasticsearch入门
Spring Data Elasticsearch集成SpringBoot 2.3.12.RELEASE
docker中使用docker-compose搭建Elasticsearch 7.8.0集群及安装IK分词器
ElasticSearch7.8.0+SpringBoot 2.3.12.RELEASE实现高亮搜索+排序+分页
Vue或html中使用L2Dwidget实现看板娘互动,对话框,语音,及Vue销毁看板娘
RabbitMQ入门
SpringBoot 2.3.12.RELEASE整合RabittMQ 3.8.12
Docker中搭建Seata1.3.0并整合SpringBoot 2.3.12.RELEASE+Nacos2.0.3
SpringCloud 项目中实现多模块共享配置类
SpringCloudAlibaba2.2.6.RELEASE集成Gateway并实现JWT鉴权
Docker下安装Nginx并部署Vue项目及接口
前端项目地址
blog-system
后端项目地址
personal-blog-system
ES索引脚本
{
"settings": {
"number_of_shards": 5,
"number_of_replicas": 1
},
"mappings": {
"properties": {
"ID": {
"type": "text"
},
"title": {
"type": "text"
},
"content": {
"type": "text"
},
"createTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss.SSS||yyyy-MM-dd'T'HH:mm:ss.SSS||yyyy-MM-dd HH:mm:ss||epoch_millis"
},
"updateTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss.SSS||yyyy-MM-dd'T'HH:mm:ss.SSS||yyyy-MM-dd HH:mm:ss||epoch_millis"
},
"status": {
"type": "integer"
},
"userInformationId": {
"type": "nested",
"properties": {
"ID": {
"type": "text"
},
"avatarLink": {
"type": "text"
},
"nickName": {
"type": "text"
}
}
}
}
}
}
/*
Navicat Premium Data Transfer
Source Server Type : MySQL
Source Server Version : 50739
Source Schema : personal_blog_system
Target Server Type : MySQL
Target Server Version : 50739
File Encoding : 65001
Date: 13/09/2022 09:35:30
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_article_details
-- ----------------------------
DROP TABLE IF EXISTS `t_article_details`;
CREATE TABLE `t_article_details` (
`ID` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文章标题',
`content` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文章内容',
`create_time` datetime(0) NOT NULL COMMENT '创建时间',
`update_time` datetime(0) NOT NULL COMMENT '更新时间',
`status` int(1) NOT NULL DEFAULT 0 COMMENT '文章状态;0-草稿,1-已发布',
`user_information_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '作者ID;关联用户ID',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_chat_record
-- ----------------------------
DROP TABLE IF EXISTS `t_chat_record`;
CREATE TABLE `t_chat_record` (
`ID` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`sender_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发送者的用户ID',
`recipient_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '接收者的用户ID',
`message_content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消息内容',
`send_time` datetime(0) NOT NULL COMMENT '发送时间',
`read_status` int(1) NOT NULL COMMENT '读取状态;0-未读,1-已读',
`type` int(1) NOT NULL COMMENT '消息类型;0-私聊,1-群聊',
`is_initialization_content` int(1) NOT NULL DEFAULT 0 COMMENT '是否为初始化内容;0-否,1-是',
PRIMARY KEY (`ID`) USING BTREE,
INDEX `sender_id_index`(`sender_id`) USING BTREE,
INDEX `recipient_id_index`(`recipient_id`) USING BTREE,
INDEX `type_index`(`type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_friends_relationship
-- ----------------------------
DROP TABLE IF EXISTS `t_friends_relationship`;
CREATE TABLE `t_friends_relationship` (
`ID` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`user_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户ID,关联用户ID',
`friends_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '好友ID,关联用户ID',
`apply_whether_adopt` int(1) NOT NULL COMMENT '是否通过了好友申请;0-否,1-是',
`add_time` datetime(0) NOT NULL COMMENT '添加好友时间',
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `user_id`(`user_id`, `friends_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_group_info
-- ----------------------------
DROP TABLE IF EXISTS `t_group_info`;
CREATE TABLE `t_group_info` (
`ID` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`group_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '群聊名称',
`group_number` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '群号',
`group_avatar_img` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '群头像链接',
`create_user_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建用户ID',
`create_time` datetime(0) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_leaving_a_message
-- ----------------------------
DROP TABLE IF EXISTS `t_leaving_a_message`;
CREATE TABLE `t_leaving_a_message` (
`ID` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`commenter_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '留言者ID',
`recipient_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '接收者ID',
`read_status` int(1) NOT NULL DEFAULT 0 COMMENT '读取状态;0-未读,1-已读',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '留言内容',
`create_time` datetime(0) NOT NULL COMMENT '创建时间',
`type` int(1) NOT NULL COMMENT '留言类型;0-系统通知,1-私信',
`is_operation` int(1) NOT NULL COMMENT '是否需要操作;0-否,1-是,2-已操作',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_user_group_relationship
-- ----------------------------
DROP TABLE IF EXISTS `t_user_group_relationship`;
CREATE TABLE `t_user_group_relationship` (
`ID` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`user_information_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关联用户ID',
`group_info_id` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关联群聊ID',
`unread_quantity` int(255) NOT NULL DEFAULT 0 COMMENT '未读消息数量',
`join_time` datetime(0) NOT NULL COMMENT '加入时间',
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `user_information_id`(`user_information_id`, `group_info_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_user_information
-- ----------------------------
DROP TABLE IF EXISTS `t_user_information`;
CREATE TABLE `t_user_information` (
`ID` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`avatar_link` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '头像地址',
`nick_name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户昵称',
`password` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
`phone_number` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '手机号码',
`create_time` datetime(0) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
INSERT INTO `t_user_information`(`ID`, `avatar_link`, `nick_name`, `password`, `phone_number`, `create_time`) VALUES ('1567812146469543930', 'https://img2.baidu.com/it/u=2548411639,1403134542&fm=253&fmt=auto&app=138&f=JPEG?w=400&h=400', '我们注定相遇', 'admin', '32312312', '2022-08-26 10:26:42');
-- ----------------------------
-- Table structure for undo_log
-- ----------------------------
DROP TABLE IF EXISTS `undo_log`;
CREATE TABLE `undo_log` (
`branch_id` bigint(20) NOT NULL COMMENT 'branch transaction id',
`xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'global transaction id',
`context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'undo_log context,such as serialization',
`rollback_info` longblob NOT NULL COMMENT 'rollback info',
`log_status` int(11) NOT NULL COMMENT '0:normal status,1:defense status',
`log_created` datetime(6) NOT NULL COMMENT 'create datetime',
`log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'AT transaction mode undo table' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
version: "3"
services:
user-management-services:
container_name: user-management-services
image: user-management-services-1.0.jar:1.0
ports:
- "9001:9001"
networks:
- micr-net
restart: always
article-management-services:
image: article-management-services-1.0.jar:1.0
container_name: article-management-services
ports:
- "9002:9002"
networks:
- micr-net
restart: always
chat-management-services:
image: chat-management-services-1.0.jar:1.0
container_name: chat-management-services
ports:
- "9003:9003"
networks:
- micr-net
restart: always
message-board-services:
container_name: message-board-services
image: message-board-services-1.0.jar:1.0
ports:
- "9004:9004"
networks:
- micr-net
restart: always
gateway-service:
container_name: gateway-service
image: gateway-service-1.0.jar:1.0
ports:
- "9005:9005"
networks:
- micr-net
depends_on:
- user-management-services
- article-management-services
- chat-management-services
- message-board-services
restart: always
networks: #创建网络
micr-net: