【最全详细配置】SpringBoot整合Redis
2023-09-14 09:05:04 时间
整合步骤
1、引入redis依赖
<!-- 引入 redis 依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
2、配置redis
spring:
redis:
database: 1
host: 192.168.1.191
port: 6379
password: imooc
3、controller测试
@Autowired
private RedisTemplate redisTemplate;
redisTemplate.opsForValue().set(key, value);
(String)redisTemplate.opsForValue().get(key);
redisTemplate.delete(key);
相关文章
- springboot+shiro+redis(单机redis版)整合教程
- redis删除主从节点
- SpringBoot使用Redis共享用户session信息
- Shiro整合springboot,freemaker,redis(含权限系统完整源码)
- springboot整合redis
- Java中使用Jedis操作Redis
- redis 简单整理——内存的管理[二十六]
- centos8安装redis
- Redis---整合SpringBoot篇
- Springboot怎么快速集成Redis?
- 【项目实战】Redis的序列化与反序列化
- 不会用SpringBoot连接Redis,那就赶紧看这篇
- scrapy_redis的使用
- Python编程:pickleDB库Redis的简易替代
- 编程实践精华总结集锦系列1: SpringBoot/Maven/IDEA/Java/Kotlin/Redis等等
- 编程实践精华总结集锦系列2: SpringBoot/Maven/IDEA/Java/Kotlin/Redis等等
- 在 windows 上安装 Redis
- SpringBoot缓存技术整合SpringData Redis
- 002-redis-数据类型(string(字符串),hash(哈希),list(列表),set(集合)及zset(sorted set:有序集合))
- SpringBoot中使用Redis
- centos下安装redis
- SpringBoot集成Redis实现分布式会话
- Redis---整合SpringBoot篇
- 基于SpringBoot+Redis实现缓存消息验证
- springboot 的 RedisTemplate 的 execute 和 executePipelined 功能的区别redis