redis在程序中的使用

来源:互联网 发布:组策略禁止安装软件 编辑:程序博客网 时间:2024/05/21 07:58


使用spring 提供的redis连接工厂

pom 加入依赖

<dependency>    <groupId>redis.clients</groupId>    <artifactId>jedis</artifactId>    <version>2.9.0</version></dependency>

<dependency>    <groupId>org.springframework.data</groupId>    <artifactId>spring-data-redis</artifactId>    <version>1.8.4.RELEASE</version></dependency>

连接工厂配置文件 http://pan.baidu.com/s/1cF8or0 密码tx08

操作类   http://pan.baidu.com/s/1nv0YHdv  密码aa08

最后在spring配置文件中导入redis连接工厂配置

原创粉丝点击