1.初始化项目
创建Maven项目并导入jedis依赖和我们需要使用的fastjson依赖
依赖可在Maven仓库中搜索找到:https://search.maven.org/
1 <!--jedis依赖--> 2 <dependency> 3 <groupId>redis.clients</groupId> 4 <artifactId>jedis</artifactId> 5 <version>3.2.0</version> 6 </dependency> 7 <!--fastjson--> 8 <dependency> 9 <groupId>com.alibaba</groupId> 10 <artifactId>fastjson</artifactId> 11 <version>1.2.62</version> 12 </dependency>