
Redis
Redis
Object^
这个作者很懒,什么都没留下…
展开
-
Springboot集成Redis
文章目录引入pom依赖配置redis引入RedisTemplate模板对redis操作编写一个测试类乱码分析及解决引入pom依赖<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis --> <dependency> ...原创 2020-05-01 19:08:18 · 403 阅读 · 0 评论 -
Redis三种特殊类型
文章目录Geospatial 地理位置getadd指令getposGEODISTgeoradiusGEORADIUSBYMEMBERGEOHASH总结HyperloglogBitmap(位存储)Geospatial 地理位置朋友的定位,附近的人,打车距离计算?Redis 的 Geo 在Redis3.2 版本就推出了! 这个功能可以推算地理位置的信息,两地之间的距离,方圆几里的人这个每个城市...原创 2020-04-27 14:32:38 · 831 阅读 · 0 评论 -
Redis的五大基本类型
文章目录1.基本知识2.五大基本类型Redis-Key的常用命令String(字符串)List(列表)Set(集合)Hash(哈希)3.三种特殊类型1.基本知识Redis默认有16个数据库,查看redis.windows.conf文件可以找到默认的使用的是第0个可以使用select切换数据库127.0.0.1:6379> select 5OK127.0.0.1:6379[5]...原创 2020-04-26 12:46:48 · 535 阅读 · 0 评论 -
Warning: no config file specified, using the default config. In order to specify a config file use
[10992] 24 Apr 14:12:37.689 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server.exe /path/to/redis.conf[10992] 24 Apr 14:12:37.699 # Crea...原创 2020-04-24 14:18:04 · 3378 阅读 · 0 评论 -
Redis实现商品秒杀功能
效果图商品名字IponeX商品库存:20件Java代码:@Log("秒杀商品") @AuthIgnore @PostMapping("getGoods") public String getGoods(String successId) { //抢购成功用户的id TbSchool tbSchool=new TbSchool(); tbSchool=tbSchoolSer...原创 2020-03-13 17:20:50 · 3024 阅读 · 0 评论 -
Java通过Redis计数器方式限制用户访问Api频率
有时候我们需要限制一个API访问的频率,例如单用户一分钟之内只能访问多少次。类似于这样的需求很容易用Redis来实现。 @Log("Api接口每分钟访问次数限制") @AuthIgnore @PostMapping("getImpose") public String getImpose(String name) { String data=""; String num=(Str...原创 2020-03-11 18:00:24 · 6046 阅读 · 2 评论 -
Redis数据库的安装
Redis安装提供Window x64系统其他系统的到Redis官网下载网盘地址:链接:https://pan.baidu.com/s/13IsjB-M1WPiijlyEPyv_Xg提取码:qs1i下载以后,解压压缩包目录文件为启动Redis打开一个 cmd 窗口 使用 cd 命令切换目录到 (解压到哪里就切换到哪里)运行:redis-server.exe出现这个界面表示...原创 2020-03-10 13:00:39 · 2113 阅读 · 1 评论