Redis进阶

大憨熊 提交于 2020-03-27 09:02:03

3 月,跳不动了?>>>

技术背景依旧是之前提到的项目

话不多述接着上一篇来

在上一篇中我们了解了Redis的基本安装与开发环境

Redis基本环境

本篇分为几个大的知识点来进行更新


1、Jedis基本使用

方式:如果使用Java连接Redis,采用jedis

三步走

  1. 新建测试项目

新建工程

  1. pom中添加坐标依赖

      <dependencies>
     	<!--redis-->
     	<dependency>
     		<groupId>org.springframework.boot</groupId>
     		<artifactId>spring-boot-starter-data-redis</artifactId>
     	</dependency>
     	<dependency>
     		<groupId>redis.clients</groupId>
     		<artifactId>jedis</artifactId>
     	</dependency>
     	<!--测试-->
     	<dependency>
     		<groupId>org.springframework.boot</groupId>
     		<artifactId>spring-boot-starter-test</artifactId>
     	</dependency>
     </dependencies>
    
  2. 测试程序

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!