SimpleYou是基于SpringBoot+Vue的聊天室,具有以下特色:
尽可能友好的UI交互
消息本地化功能
支持图片传输
外观:
![](pics/1.png)
![](pics/2.png)
![](pics/3.png)
![](pics/4.png)
本地启动流程:
1 启动MongoDB,并新建数据库“FSIM”
```
use FSIM
```
2 执行MySQL相关库表创建
```mysql
create database if not exists FSIM;
use FSIM;
create table if not exists friend_applies
(
id int auto_increment comment 'id'
primary key,
apply_user_id int null,
applied_user_id int null,
accept_or_refuse int null,
create_time datetime null
);
create table if not exists group_user_relation
(
id int auto_increment comment 'id'
primary key,
user_id int null,
job varchar(20) null,
create_time datetime null
);
create table if not exists user
(
id int auto_increment comment 'id'
primary key,
name varchar(128) null,
pwd varchar(124) null,
head_img varchar(524) null,
phone varchar(64) null,
create_time datetime null
);
create table if not exists user_group
(
id int auto_increment comment 'id'
primary key,
name varchar(128) null,
head_img varchar(524) null,
create_time datetime null
);
create table if not exists user_relation
(
id int auto_increment comment 'id'
primary key,
user_id1 int null,
user_id2 int null,
relation int null,
create_time datetime null
);
```
3 修改{project_dir}/java/src/main/resources/application.yml中的相关信息,填入mysql对应的用户名和密码
```
******
username: //mysql用户名
password: //mysql密码
******
```
4 启动后端java项目
5 如果需求图片功能,则需要修改前端vue项目中的相关配置信息
找到config.js并按照提示添加华为云OBS相关信息
```javascript
OBS_CONFIG = {
// 华为云OBS相关配置
access_key_id:'',// 你的ak
secret_access_key: '',// 你的sk
server: '',// 你的endPoint,
avater_bucket_name: '',// 存放头像的桶名
avater_bucket_url: '',//示例 'https://avater.obs.cn-north-1.myhuaweicloud.com/'
message_bucket_name: '',// 存放聊天图片的桶名
message_bucket_url: '',//示例 'https://message.obs.cn-north-1.myhuaweicloud.com/
}
```
6 加载前端项目依赖并启动前端项目
```shell
cd {project_dir}/vue
npm install -g cnpm -registry=https://registry.npm.taobao.org
cnpm install
cnpm run serve
```
7 启动完成
进入http://localhost:8080/#/login即可注册用户,此时便可以在本地体验项目。
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于SpringBoot+Vue的支持图片传输和消息本地化的聊天室源码.zip (53个子文件)
SimpleYou-master
pics
1.png 126KB
2.png 90KB
4.png 13KB
3.png 36KB
.gitignore 53B
java
pom.xml 4KB
src
main
resources
application.yml 1KB
mapper
UserMapper.xml 3KB
FriendMapper.xml 2KB
java
com
fengshang
im
Intercepter
LoginInterceptor.java 3KB
InterceptorConfig.java 1KB
CorsInterceptor.java 2KB
App.java 631B
mapper
UserSessionDao.java 2KB
UserMapper.java 690B
MessageDao.java 3KB
FriendMapper.java 888B
controller
WebSocket.java 6KB
UserController.java 7KB
FriendController.java 5KB
WebSocketConfig.java 430B
entity
User.java 3KB
FriendApply.java 2KB
Message.java 5KB
UserSession.java 842B
LoginReturnPOJO.java 695B
utils
JsonWrapper.java 3KB
JsonUtils.java 3KB
SpringContextUtil.java 1KB
JWTUtils.java 2KB
CommonUtils.java 703B
CurPool.java 454B
README.md 3KB
vue
vue.config.js 258B
package.json 982B
package-lock.json 435KB
src
theme.styl 7KB
App.vue 255B
assets
logo.png 7KB
views
ToUserId
ToUserId.vue 47KB
Register
Register.vue 3KB
RegisterOld.vue 3KB
Login
Login.vue 3KB
LoginOld.vue 3KB
main.js 851B
request.js 220B
router
index.js 600B
cube-ui.js 1KB
store
index.js 2KB
public
config.js 506B
index.html 654B
favicon.ico 9KB
babel.config.js 73B
共 53 条
- 1
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 6713
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功