Skip to content

acloudyh/springboot

Repository files navigation

springboot 练习

博客

个人主页

CSDN

更新记录

Netty

netty 学习 README.md

ShardingSphere

ShardingSphere 分库分表/读写分离

Mongo

  1. springboot 整合mongo(简单处理)

oauth2.0

  1. oauth2.0实现鉴权(客户端和密码模式)
http://localhost:8888/oauth/token?username=user_1&password=123456&grant_type=password&scope=select&client_id=client_2&client_secret=123456

http://localhost:8888/oauth/token?grant_type=client_credentials&scope=select&client_id=client_1&client_secret=123456
  1. UserDetailsService 示例放在内存中,实际项目数据库保存

Redis

  1. 单机版redis Jackson2JsonRedisSerializer序列化类型(集群暂不做处理)
  2. token 存放redis,性能好点而且有自动过期机制

Easyexcel

  1. 阿里easyexcel 利用注解model导出文件
  2. 无注解动态导出

poi

  1. 导出文件工具类ExcelUtil
  2. 时间转换工具类DateUtil
  3. 邮件模板thymeleaf调用
  4. Java POI 导出excel文件,若导出数量过大,后台导出以附件的形式发送到邮箱

BigDecimalUtil

  1. BigDecimalUtil数字运算工具类

TIPS:

mysql涉及到浮点型数据时采用decimal(10,2),具体精确度视情况而定;此时jpa中对应的字段 (吃过亏)

@Column(columnDefinition = "decimal(15,3) COMMENT ‘用量'")
private BigDecimal overCycleDataUsage = BigDecimal.ZERO;

Netty jt808

  1. netty jt808协议 借鉴github

Kafka

  1. springboot 整合spring kafka(先暂停)