开发者社区> 问答> 正文

springboot 集成redis怎么弄

springboot 集成redis怎么弄

展开
收起
游客ahv54x37wvm7u 2021-10-26 18:30:48 440 0
1 条回答
写回答
取消 提交回答
  • 1、在pom文件中引入即可 org.springframework.boot spring-boot-starter-redis 2、编写一个CacheService接口,使用redisCacheServiceImpl实现这个接口 官网的原文是这样的,也就是说,提供三个接口注入和你自己实现的其他实现类,默认是本地端口号为6379的redis You can inject an auto-configured RedisConnectionFactory, StringRedisTemplate or vanilla RedisTemplate instance as you would any other Spring Bean.By default the instance will attempt to connect to a Redis server using localhost:6379:

    2021-10-26 18:31:14
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
阿里邮箱—安全高效集成 立即下载
集成智能接入网关APP:优化企业级移动办公网络 立即下载
云效助力企业集成安全到DevOps中 立即下载