当前位置: 首页 > news >正文

linyu-im

linyu-mini-server:springboot + vue + mysql。一款非常漂亮的linyu-im,它的mini版本,仅使用了mysql数据库
在这里插入图片描述在这里插入图片描述

1、数据库有sqlite和mysql,这里修改为mysql
2User类的badge徽章字段中使用了JacksonTypeHandler转为字符串为List<String>
3、一共4张表: user(用户表)、chat_list(聊天会话表)、message(消息表)、group(群组表)
4SecurityUtil 实现了rsa非对称公钥加密,私钥解密,aes对称加密解密
5DataBaseInitializer 在bean创建好后,读取sql文件,使用jdbcTemplate执行sql语句,创建表(如果不存在的话)。包括sqlite和mysql。
6、引入这个依赖,处理敏感词<dependency><groupId>com.github.houbb</groupId><artifactId>sensitive-word</artifactId><version>0.24.0</version></dependency>SensitiveWordConfig 定义 SensitiveWordBs 这个bean,并在 MessageServiceImpl 中使用这个bean的replace方法作替换
7、在 UserInfoArgumentResolver 中解析controller的 @Userid@UserIp2个注解,其中userid从request的属性的userinfo中获取userid,而userIp则使用 IpUtil 获取
8、使用 FilterRegistrationBean 定义 CorsFilter,解决跨域问题
9、在 CacheUtil 中使用 Caffeine 缓存,缓存用户id和token
<dependency><groupId>com.github.ben-manes.caffeine</groupId><artifactId>caffeine</artifactId>
</dependency>
10AuthenticationTokenFilter 过滤器使用 JwtUtil 解析用户x-token
11UrlLimitAspect 切面识别 @UrlLimit 注解(用户id或请求ip、请求次数),结合Caffeine缓存作限流
12ExpiredClearTask 清理了7天之前的 message 和 user
13、引入sshd的依赖<dependency><groupId>org.apache.sshd</groupId><artifactId>sshd-core</artifactId><version>2.14.0</version></dependency>SshServerService 中创建了1SshServer,并且端口是 2222,并且提供了密码认证器。这时,比如在windows启动了linyu应用,然后在windows的cmd中输入 ssh -p 2222 linyu@127.0.0.1,就会进入到ssh的终端(或者在linux上面输入 ssh -p 2222 linyu@192.168.134.5

http://www.mrgr.cn/news/93634.html

相关文章:

  • powershell@宝塔面板批量建站脚本@批量设置@批量部署伪静态设置
  • three.js 在 webGL 添加纹理
  • Linux教学总目录
  • #UVM# 关于 config_db 机制中省略 get 语句的条件
  • 扎实基础:测试工作的基石
  • C++学习之QT基础
  • 【GPT入门】第8课 大语言模型的自洽性
  • 力扣203题:移除链表元素及代码实现分析
  • name ‘bare_metal_version‘ is not mamba_ssm安装
  • Redis|Springboot集成Redis
  • 完整版已注册,永久授权!
  • 计算机毕业设计SpringBoot+Vue.js车辆管理系统(源码+文档+PPT+讲解)
  • C语言学习笔记-进阶(7)字符串函数3
  • Day04 模拟原生开发app过程 Androidstudio+逍遥模拟器
  • 安装完flash-attn,使用时报错undefined symbol
  • vocabulary is from your listening,other speaking and your thought.
  • Spark数据倾斜深度解析与实战解决方案
  • Java并发编程面试题:内存模型(6题)
  • 一步步解析 HTTPS
  • C/C++蓝桥杯算法真题打卡(Day4)