Skip to content

一个基于 Kanarienvogels/Chatroom 的聊天系统。(SpringBoot + Mybatis + Netty + WebSocket)

Notifications You must be signed in to change notification settings

huangkangyan/chatting

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chatting

chatting 后端仓库。前端请前往chatting-vue

Usage

1. 配置数据库

-- mysql -u root -p
CREATE DATABASE chatting;
CREATE USER 'webchatting'@'localhost' IDENTIFIED BY 'webchatting';
GRANT ALL PRIVILEGES ON chatting.* TO 'webchatting'@'localhost';
quit

2. 根据主机环境修改配置文件

主要是数据库 URL 和账号密码:

datasource:
  url: jdbc:mysql://localhost:3306/chatting?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowPublicKeyRetrieval=true
  username: webchatting
  password: webchatting

3. Build and Run

  1. On Local Host:

    # build
    mvn package
    
    # run application
    mvn spring-boot:run
  2. Use Docker:

    # manually
    docker build -t webchatting/chatting .
    docker run -d -p 8088:8088 -p 3333:3333 webchatting/chatting
    
    # or use make
    make run

Optimize

Database

see query.sql.

ToDo

  • refactor backend with SpringBoot
  • design and use db
    • use Mybatis
    • use Druid
  • use @Slf4j replace logger field
  • refactor frontend, see chatting-vue
  • use Logback replace slf4j
  • use Redis
  • automatically delete files when they expire
  • deploy with docker

About

一个基于 Kanarienvogels/Chatroom 的聊天系统。(SpringBoot + Mybatis + Netty + WebSocket)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.5%
  • Other 1.5%