springboot 中 RedisCacheManager rm = new RedisCacheManager(redisTemplate);我的项目没这个构造

springboot 中 RedisCacheManager rm = new RedisCacheManager(redisTemplate);我的项目没这个构造,第1张

pomxml 引入redis 开启缓存

<!-- cache -->

<dependency>

<groupId>orgspringframeworkboot</groupId>

<artifactId>spring-boot-starter-cache</artifactId>

</dependency>

<!-- redis -->

<dependency>

<groupId>orgspringframeworkboot</groupId>

<artifactId>spring-boot-starter-data-redis</artifactId>

</dependency>

applicationproperties 配置文件

# Redis数据库索引(默认为0)springredisdatabase=0

# Redis服务器地址springredishost=localhost

# Redis服务器连接端口springredisport=6379

# Redis服务器连接密码(默认为空)springredispassword=

# 连接池最大连接数(使用负值表示没有限制)

springredispoolmax-active=8

# 连接池最大阻塞等待时间(使用负值表示没有限制)

springredispoolmax-wait=-1

# 连接池中的最大空闲连接

springredispoolmax-idle=8

# 连接池中的最小空闲连接

springredispoolmin-idle=0

# 连接超时时间(毫秒)

springredistimeout=0

添加cache的配置类

package >

以上就是关于springboot 中 RedisCacheManager rm = new RedisCacheManager(redisTemplate);我的项目没这个构造全部的内容,包括:springboot 中 RedisCacheManager rm = new RedisCacheManager(redisTemplate);我的项目没这个构造、如何使用jackson美化输出json/xml、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/9266333.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-26
下一篇 2023-04-26

发表评论

登录后才能评论

评论列表(0条)

保存