-
2021-09-28 13:43:24
1.引入依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency>
2.配置yml
spring: redis: ## Redis数据库索引(默认为0) database: 0 ## Redis服务器地址 host: 127.0.0.1 ## Redis服务器连接端口 port: 6379 ## Redis服务器连接密码(默认为空) password: root jedis: pool: ## 连接池最大连接数(使用负值表示没有限制) #spring.redis.pool.max-active=8 max-active: 8 ## 连接池最大阻塞等待时间(使用负值表示没有限制) #spring.redis.pool.max-wait=-1 max-wait: -1 ## 连接池中的最大空闲连接 #spring.redis.pool.max-idle=8 max-idle: 8 ## 连接池中的最小空闲连接 #spring.redis.pool.min-idle=0 min-idle: 0 ## 连接超时时间(毫秒) timeout: 1200
3.使用注解的方法
https://blog.csdn.net/wujiaqi0921/article/details/79123873
更多相关内容 -
redis在springboot中使用
2022-04-22 23:49:06redis使用 把一些经常查询,不经常修改的可放进去 比如:将首页放进去(访问量大) 项目集成Redis 1:引入依赖 <!-- redis --> <dependency> <groupId>org.springframework.boot</groupId>...redis使用
把一些经常查询,不经常修改的可放进去
比如:将首页放进去(访问量大)
项目集成Redis
1:引入依赖
<!-- redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <!-- spring2.X集成redis所需common-pool2--> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> <version>2.6.0</version> </dependency>
2:创建配置类(固定)
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.CachingConfigurerSupport; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.cache.RedisCacheConfiguration; import org.springframework.data.redis.cache.RedisCacheManager; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; import org.springframework.data.redis.serializer.RedisSerializationContext; import org.springframework.data.redis.serializer.RedisSerializer; import org.springframework.data.redis.serializer.StringRedisSerializer; import java.time.Duration; @EnableCaching @Configuration public class RedisConfig extends CachingConfigurerSupport { @Bean public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) { RedisTemplate<String, Object> template = new RedisTemplate<>(); RedisSerializer<String> redisSerializer = new StringRedisSerializer(); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jackson2JsonRedisSerializer.setObjectMapper(om); template.setConnectionFactory(factory); //key序列化方式 template.setKeySerializer(redisSerializer); //value序列化 template.setValueSerializer(jackson2JsonRedisSerializer); //value hashmap序列化 template.setHashValueSerializer(jackson2JsonRedisSerializer); return template; } @Bean public CacheManager cacheManager(RedisConnectionFactory factory) { RedisSerializer<String> redisSerializer = new StringRedisSerializer(); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); //解决查询缓存转换异常的问题 ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jackson2JsonRedisSerializer.setObjectMapper(om); // 配置序列化(解决乱码的问题),过期时间600秒 RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig() .entryTtl(Duration.ofSeconds(600)) .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer)) .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer)) .disableCachingNullValues(); RedisCacheManager cacheManager = RedisCacheManager.builder(factory) .cacheDefaults(config) .build(); return cacheManager; } }
3:在所需的类上添加缓存的注解
在写逻辑的地方(实现类)
3.1:@Cacheable
查询时使用
也就是,页面调用的时候:
第一次访问,查询数据库,并将查到加到缓存
第二次访问,先查看缓存,如果没有,重新第一步
value:缓存名(指定了你的缓存放在哪块命名空间)
cacheNames:与 value 差不多,二选一即可
key:可选属性,可以使用 SpEL 标签自定义缓存的key
3.2:@CachePut
使用该注解标志的方法,每次都会执行,并将结果存入指定的缓存中。一般用在新增方法上。
value:缓存名(指定了你的缓存放在哪块命名空间)
cacheNames:与 value 差不多,二选一即可
key:可选属性,可以使用 SpEL 标签自定义缓存的key
3.3:@CacheEvict
使用该注解标志的方法,会清空指定的缓存。一般用在更新或者删除方法上
value:缓存名(指定了你的缓存放在哪块命名空间)
cacheNames:与 value 差不多,二选一即可
key:可选属性,可以使用 SpEL 标签自定义缓存的key
allEntries:是否清空所有缓存,默认为 false。如果指定为 true,则方法调用后将立即清空所有的缓存
beforeInvocation:是否在方法执行前就清空,默认为 false。如果指定为 true,则在方法执行前就会清空缓存
例:
@Cacheable(value = "banner", key = "'selectIndexList'")
4:启动redis
启动:redis-server /myredis/redis.conf
进入客户端:redis-cli
注:在redis配置文件中
1:修改protected-mode yes为no
2:注释掉:#bind 127.0.0.1
5:在配置文件中配置redis地址
#为虚拟机地址 spring.redis.host=192.168.126.128 spring.redis.port=6379 spring.redis.database= 0 spring.redis.timeout=1800000 spring.redis.lettuce.pool.max-active=20 spring.redis.lettuce.pool.max-wait=-1 #最大阻塞等待时间(负数表示没限制) spring.redis.lettuce.pool.max-idle=5 spring.redis.lettuce.pool.min-idle=0
6:当需要从redis中查询个东西时
在其内有,从redis中查询,以及将东西放入,设置有效时间
先注入
@Autowired private RedisTemplate<String,String> redisTemplate;
6.1:查询时
//根据手机号从redis获取验证码,如果成功,直接返回 String code = redisTemplate.opsForValue().get(phone);
6.2:把东西放入redis设置有效时间
redisTemplate.opsForValue().set(phone,code,5, TimeUnit.MINUTES);
下面是全部的:
@RestController @RequestMapping("/edumsm/msm") @CrossOrigin public class MsmController { @Autowired private MsmService msmService; @Autowired private RedisTemplate<String,String> redisTemplate; @GetMapping("send/{phone}") public R msmSend(@PathVariable String phone){ //根据手机号从redis获取验证码,如果成功,直接返回 String code = redisTemplate.opsForValue().get(phone); if (!StringUtils.isEmpty(code)){ return R.ok(); } //发送手机验证码 //生成随机值,传递阿里云进行发送 code= RandomUtil.getFourBitRandom(); Map<String,Object> param = new HashMap<>(); param.put("code",code); //调用service发送短信的方法 boolean isSend=msmService.send(param,phone); if(isSend) { //发送成功,把发送成功验证码放到redis里面 //设置有效时间(5分钟) redisTemplate.opsForValue().set(phone,code,5, TimeUnit.MINUTES); return R.ok(); } else { return R.error().message("短信发送失败"); } } }
-
三、Redis在SpringBoot中使用案例
2019-08-03 18:08:13最初的目的就想要在项目中把Redis用起来,然后最近公司的项目全部需要转成springboot,所以现在的项目都是Springboot的,自己刚好也研究下Springboot的。所以才有了下文的案例。 项目结构以及相关配置 先创...前言
最初的目的就想要在项目中把Redis用起来,然后最近公司的项目全部需要转成springboot,所以现在的项目都是Springboot的,自己刚好也研究下Springboot的。所以才有了下文的案例。
项目结构以及相关配置
先创建一个springboot 项目,目录结构大体如下。
在pom.xml 加入依赖<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--Redis使用starter--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <!--注解日志/get/set--> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> </dependency>
说明一下,第一个依赖starter-web 是创建web应用的依赖。lombok 是我自己添加的一个依赖用来注解日志,属性的get/set方法比较方便,其他的三个依赖就是项目中使用redis的依赖啦,一般项目中想要使用redis引入这三个依赖就可以了。
在application.properties中配置redis
#配置redis # Redis数据库索引(默认为0) spring.redis.database=0 # Redis服务器地址 spring.redis.host=192.168.252.53 # Redis服务器连接端口 spring.redis.port=6379 # Redis服务器连接密码(默认为空) spring.redis.password= # 连接池最大连接数(使用负值表示没有限制) 默认 8 spring.redis.lettuce.pool.max-active=8 # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1 spring.redis.lettuce.pool.max-wait=-1 # 连接池中的最大空闲连接 默认 8 spring.redis.lettuce.pool.max-idle=8 # 连接池中的最小空闲连接 默认 0 spring.redis.lettuce.pool.min-idle=0
创建Dao层
创建dao 包,创建一个User 类,这里使用了lombok提供的@Getter 和@Setter 非常方便,代码看着也很简洁。
import lombok.Getter; import lombok.Setter; import java.io.Serializable; @Getter @Setter public class User implements Serializable { private static final long serialVersionUID = 1L; private Long id; private String userName; private String password; private String email; private String nickname; private String regTime; public User(String email, String nickname, String password, String userName, String regTime) { super(); this.email = email; this.nickname = nickname; this.password = password; this.userName = userName; this.regTime = regTime; } }
创建Service层
创建一个service 包,创建一个RedisService类,代码如下:
import com.zlf.learning.Redis.dao.User; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.ValueOperations; import org.springframework.stereotype.Service; @Service @Slf4j public class RedisService { @Autowired private RedisTemplate redisTemplate; public boolean setUser(User user){ ValueOperations ops=redisTemplate.opsForValue(); ops.set(user.getNickname(),user); log.info("{}",user.toString()); return true; } public User getUser(String name){ ValueOperations ops=redisTemplate.opsForValue(); return (User) ops.get(name); } }
这里面的代码也非常的清晰,使用到的RedisTemplate ,类似于JdbcTemplate .
ValueOperations ops=redisTemplate.opsForValue();就是连接了redis数据库。之后就可以从redis 中获取和添加值啦。Controller层
创建一个controller 包,创建一个RedisController类代码如下:
@RestController public class RedisController { @Autowired private RedisService redisService; @RequestMapping("/getUser") public User getUser(){ String name="quellan"; return redisService.getUser(name); } @RequestMapping("/setUser") public String setUser(){ User user=new User("aa@qq.com","quellan","123456","朱",new Date().getTime()+""); redisService.setUser(user); return "添加成功"; } }
测试
到此为止基础的就已经完全搭建好了,可以测试运行下。启动spring boot项目
在redis查一下,发现redis中的key 值并不是我们设置的quellan ,而是一串。这就很难受啦。
查了一下,原来是使用的RedisTemplate ,spring-data-redis的RedisTemplate<K, V>模板类在操作redis时默认使用JdkSerializationRedisSerializer来进行序列化.这个具体的放在下一章讲吧,感觉一会讲不完,先跳过哈哈。
上面的测试说明项目中已经可以正常使用redis啦。Session共享
按理说到上面就已经差不多,接下来来点骚操作。
分布式怎么共享session。简单来说就是一个项目部署了多个,怎么确保一个用户访问不同的项目(用户实际是无感知的,通过Nginx转发,实现负载均衡)时确保session一致。盗一张图来展示一下吧。
这张图就是多个Tomcat,那怎么实现session共享呢,就是把session存到redis中,每次去就从redis中取,这样就保证了session共享啦。那这样是不是每次存session都需要手动存到redis中呢,常理来说当然是的,但是既然是SpringBoot 当然需要不一样啦,只需要增加一个依赖,人家就能帮你自动的加载到redis中。下面来看
增加依赖
<dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> </dependency>
配置上面已经配置好了
增加SpringSession 类
在controller 包中加一个SpringSession 类,命名可能不太规范,见谅哈
@RestController public class SpringSession { @Value("${server.port}") Integer port; @RequestMapping("/setSession") public String setSession(HttpSession session){ session.setAttribute("key","quellanAn"); return String.valueOf(port); } @RequestMapping("/getSession") public String getSession(HttpSession session){ return session.getAttribute("key")+":"+port; } }
代码很简单,就是session存一个值,get获取。这里可以看到没有任何操作redis数据库的对吧。
测试场景1
先运行项目,查看一下
这些都没有什么,我们去redis中看一下,redis中是有session值的。
测试场景2
好的,接下来继续,因为上面还看不出来共享session。我们将项目打包成jar包运行,这样我们就可以多个端口运行啦,模拟分布式。
run.bat 中代码:title learingPorject8090 chcp java -jar learningproject-1.0.0.jar --server.port=8090
run2.bat 改一下端口号就好了。
然后运行jar包,在界面访问
这样就实现session共享啦。
番外
再多说一句,设置session的过期时间
在启动类中加上注解
设置过期时间1分钟@EnableRedisHttpSession(maxInactiveIntervalInSeconds=60)
-
Redis在springboot中的使用教程
2020-08-27 08:46:39主要介绍了Redis在springboot中的使用教程,本文实例代码相结合的形式给大家介绍的非常详细,需要的朋友可以参考下 -
Redis简单介绍以及在Springboot中使用redis
2022-04-03 20:05:332.redis支持数据的持久化,可以将内存中的数据保持在磁盘中,重启的时候再次加载进行使用。 3.Redis有灾难恢复机制。因为可以把缓存中的数据持久化到磁盘上。 4.redis同时使用了惰性删除与定期删除。 5.redis支持...Redis简单介绍:
Redis是一个使用c语言开发的数据库,它的数据是存在内存中的,读写速度很快,因此被广泛的应用于缓存方面。
redis特点:
1.redis支持key-value、list、set、zset、hash等数据结构的存储。
2.redis支持数据的持久化,可以将内存中的数据保持在磁盘中,重启的时候再次加载进行使用。
3.Redis有灾难恢复机制。因为可以把缓存中的数据持久化到磁盘上。
4.redis同时使用了惰性删除与定期删除。
5.redis支持发布订阅模型、lua脚本、事务等功能。
6.redis有原生的集群模式。如果添加了缓存,则用户在进行请求时,是先在缓存中找是否存在有对应的数据,如果缓存中存在数据就直接返回给用户,如果缓存中没有,则在数据库中查找,如果数据库中存在,就把数据更新到缓存中,如果数据库中也没有对应的数据,那么就返回空数据。
为什么要使用缓存?
高性能:因为访问数据库中的数据时,因为是从硬盘中读取的,过程会较慢。如果用户经常要访问这个数据,就比如抖音视频的点赞数,可能会在短时间内不断增加,这时就要先存到缓存中。
使用缓存可以使用户在第二次访问这些数据的时候就直接操作内存获取了,速度较快。
高并发:redis的QPS大约是Mysql的10-100倍(QPS:服务器每秒可以查询的次数),所以redis很读写性能较优越。
直接操作缓存能够承受的数据库请求数量是远大于直接访问数据库的,提高了系统整体的并发性。redis的常见的数据结构及命令操作:
springboot中使用redis
springBoot中对很多Nosql数据库都提供了自动化配置的支持,其中就有redis.
springBoot提供了对缓存功能的抽象,即允许绑定不同的缓存解决方案(如 ehcache、redis…)。但本身不直接提供缓存功能的实现,它支持注解方式使用缓存。RedisTemplate是Spring中用于操作Redis的工具类。
1.导入依赖:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-redis</artifactId> </dependency>
2.配置application.yml
redis: #数据库索引 database: 7 host: 127.0.0.1 port: 6379 password: #连接超时时间(ms) timeout: 5000 # 自定义redis默认过期时间(单位:时) expire-time: 24 jedis: pool: # 连接池最大连接数(使用负值表示没有限制) max-active: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) max-wait: -1
redis默认密码是空。
3.添加缓存注解。
@CacheConfig
是一个类级别的注解,允许共享缓存的名称。
一个类可能会有多个缓存操作而这些缓存操作可能是重复的,这时候可以使用@CacheConfig.
@Cacheable:
是标记方法或类上的,标识该方法支持缓存,Spring调用注解标识方法后会将返回值缓存到redis中。
主要参数:
value : 缓存的名称,在spring配置中定义,必须指定至少一个。
key: 缓存的key,可以为空,如果指定要按照spel表达式编写,如果不指定,则缺省按照方法的所有参数进行组合。
condition: 缓存的条件,可以为空,使用spek编写,返回true或false,只有为true使才进行缓存。
如果在类上配置了@CacheConfig,那么此时@Cacheable中的value就会取代@CacheConfig中cacheNames,如上。
如果在类上配置了@CacheConfig(cacheNames = " "),在该类下的@Cacheable中可以不用配置value.
默认key生成:
如果没有参数,则使用0作为key;
如果只有一个参数,使用该参数作为key;
如果有多个参数,使用包含所有参数的hashCode作为key@CacheEvict
标记在方法上,方法执行完毕之后根据条件或key删除对于的缓存。
主要参数:
allEntries : 布尔类型 表示是否需要清除缓存中的所有元素。
key: 需要删除的缓存的key当我们在更新数据库的数据时,要使用@CacheEvict,需要把redis的缓存清空,否则查询的数据就是redis缓存中的数据,这样就会导致数据库和缓存数据不一致的问题。(页面不能及时的同步更新后的数据)。
加上@CacehEvict 就会在查询数据时发现数据时最新的,与数据库保持一致.
-
SpringBoot中使用Redis
2022-06-07 11:33:35SpringBoot中使用Redis -
详解springboot配置多个redis连接
2020-08-30 19:09:29Spring Boot为Redis, MongoDB, Elasticsearch, Solr和Gemfire提供自动配置。本文详细介绍了springboot配置多个redis连接,有兴趣的可以了解一下。 -
SpringBoot中Shiro缓存使用Redis、Ehcache的方法
2020-08-25 15:34:05主要介绍了SpringBoot中Shiro缓存使用Redis、Ehcache的方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧 -
redis整合Springboot
2022-02-08 22:20:30redis集成Springboot注解式使用 -
在springboot项目中使用redis
2021-10-13 11:51:171.启动安装在本地的redis(安装redis并启动的详细步骤在上一篇文章中) 2.在pom.xml中引入依赖 <!--redis缓存--> <dependency> <groupId>org.springframework.boot</groupId> <... -
SpringBoot项目 MybatisPlus使用 Redis缓存.zip
2022-02-13 10:13:39SpringBoot项目 MybatisPlus使用 Redis缓存.zip -
springboot使用redis
2021-12-12 09:39:26springboot使用redis redis-service.exe : 服务端,启动后不要关闭 redis-cli.exe : 客户端,访问redis中的数据 redisclient-win32.x86_64.2.0.jar : redis的图形界面客户端,执行方式是在这个文件的目录执行 java -jar... -
Redis - Springboot中集成多个Redis客户端统一管理
2021-12-18 17:27:05Springboot中集成多个Redis客户端统一管理 前言: 我们都知道 springboot 中要么是集群管理,要么是对单个 Redis 管理,但是维度没有对多个 Redis 管理。在工作中我们都发现 Redis 如果是用集群存储,那每个 Redis ... -
springboot整合redis代码
2018-05-14 09:39:51springboot整合redis.算是比较全面的一种整合方式了. springboot整合redis.算是比较全面的一种整合方式了. -
SpringBoot使用Redis
2021-04-23 20:30:23使用redisTemplate该类可以存放任意类型的数据,但是该类型的数据必须实现序列,获取redis中对应的数据时,会进行反序列化。 如果使用RedisTemplate建议大家指定key,value,以及hashkey的序列化方式。 锁都是多... -
springboot+redis+虚拟机 springboot连接linux虚拟机中的redis服务
2022-04-14 08:44:32文章目录1、前提条件:确保虚拟机开启、并且连接到redis2、新建立一个springboot项目,创建项目时勾选web选项3、在pom中引入redis依赖4、在application.properties中尽心redis的配置5、增加redis配置类6、测试类7、... -
SpringBoot整合Redis实例
2018-02-24 15:58:20SpringBoot整合Redis,包括整合单机版Redis、redis-cluster集群、redis哨兵模式 -
SpringBoot整合Redis(SpringBootTest及RedisTemplate)
2021-05-14 22:03:18文章目录前情提要SpringBoot整合Redis创建...之前学习了使用Java链接Redis数据库的操作,但在实际的开发中,我们并不使用该方式进行对Redis的操作,而是使用RedisTemplate对Redis进行数据操作 SpringBoot整合Re -
SpringBoot集成Shiro、Jwt和Redis
2020-10-24 18:46:19SpringBoot集成Shiro、Jwt和Redis,使用MyBatisPlus框架实现后台数据库操作。 -
Springboot项目中使用Redis
2022-03-23 13:41:13加入redis依赖 版本号由父工程管理 <!-- spring-boot 的redis依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis<... -
springBoot集成redis
2018-03-03 16:02:44springBoot+mybatis+redis集成,不上代码要确保redis服务端已经运行 -
SpringBoot_Shiro_JWT_Redis:SpringBoot整合Shiro、JWT和Redis实现token登录授权验证以及token刷新
2021-05-14 05:06:40 在微服务中我们一般采用的是无状态登录,而传统的session方式,在前后端分离的微服务架构下,如继续使用则必将要解决跨域sessionId问题、集群session共享问题等等。这显然是费力不讨好的,而整合shiro,却很不... -
最最最简单的SpringBoot+Redis
2019-03-04 16:08:50首先需要本机安装Redis5.0以上版本,然后直接启动App类即可 -
springboot-redis:springboot整合redis博客
2021-03-24 08:11:21springboot-redis:springboot整合redis博客源码 -
SpringBoot 中使用Redis缓存
2020-12-19 12:47:37SpringBoot 中使用Redis缓存 在项目中我们访问数据通常的操作就是访问数据库的方式,但是如果访问量很大而且特别频繁会对数据库造成压力,甚至导致数据库直接崩溃。为了解决这类的问题,redis框架逐渐出现在我们的... -
springboot+netty+websocket+redis
2021-03-08 17:31:20springboot+netty+websocket+redis 分布式聊天,实现简单的聊天功能 -
SpringBoot集成redis
2019-08-01 20:07:35今天,日月在这里教大家如何使用springBoot集成redis,说实话比较简单,网上也有大把的教程。先套用一下网上的简介。 定义 REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统。 ... -
基于mongodb数据库的集成redis缓存springboot实战
2018-08-01 15:25:24本实战采用mongodb为数据库,集成redis缓存,指在让初学者能够快速、简单的认识和使用这两个东西。 -
SpringBoot中使用Redis的完整实例
2020-09-08 15:19:12主要给大家介绍了关于SpringBoot中使用Redis的相关资料,文中通过图文介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧