java Spring Boot 配置redis pom文件操作
作者:默......小白 时间:2022-01-25 20:57:13
1.创建一个redis maven项目,在pom中添加如下信息
spring boot 版本
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
</parent>
项目相关jar配置
<dependencies>
<!-- 热开发注解 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<!--redis jar-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
补充知识:Java中使用redis所需要的pom依赖
我就废话不多说了,大家还是直接看代码吧~
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
来源:https://blog.csdn.net/PengXH2019/article/details/100893897
标签:java,Spring,Boot,redis,pom
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Java语言中cas指令的无锁编程实现实例
2022-10-13 19:20:28
java转化为exe程序步骤详解
2022-05-01 10:10:43
![](https://img.aspxhome.com/file/2023/9/111439_0s.png)
SpringBoot实现异步事件驱动的方法
2023-11-01 07:48:54
java数学工具类Math详解(round方法)
2022-09-10 17:01:00
详解Mybatis中的PooledDataSource
2022-10-24 18:08:11
Java xml出现错误 javax.xml.transform.TransformerException: java.lang.NullPointerException
2023-11-08 14:48:13
理解zookeeper选举机制
2023-04-15 20:09:44
![](https://img.aspxhome.com/file/2023/6/90206_0s.jpg)
IntelliJ IDEA 2020.2正式发布,两点多多总能助你提效
2023-08-30 18:15:18
![](https://img.aspxhome.com/file/2023/2/58082_0s.jpg)
WPF设置窗体可以使用鼠标拖动大小的方法
2023-05-11 12:38:50
java实现List中对象排序的方法
2023-11-08 21:36:29
通过Java实现文件断点续传功能
2022-06-22 16:30:42
![](https://img.aspxhome.com/file/2023/0/80830_0s.png)
安卓输入框被虚拟键盘挡住的问题(微信开发)
2023-12-01 15:42:43
![](https://img.aspxhome.com/file/2023/9/104659_0s.png)
java ThreadLocal使用案例详解
2022-02-01 05:14:57
![](https://img.aspxhome.com/file/2023/9/72319_0s.jpg)
快速定位Java 内存OOM的问题
2022-05-26 00:19:38
![](https://img.aspxhome.com/file/2023/4/83034_0s.jpg)
Java关键字详解之final static this super的用法
2022-01-19 09:24:39
![](https://img.aspxhome.com/file/2023/3/62123_0s.png)
Java中的MapStruct用法详解
2022-10-05 12:18:13
![](https://img.aspxhome.com/file/2023/4/78004_0s.png)
java实现文件上传下载功能
2021-11-26 17:19:05
![](https://img.aspxhome.com/file/2023/7/85887_0s.jpg)
Java实现五子棋(附详细源码)
2023-10-19 15:20:54
![](https://img.aspxhome.com/file/2023/4/63384_0s.jpg)
selenium+java破解极验滑动验证码的示例代码
2022-11-19 21:52:01
![](https://img.aspxhome.com/file/2023/1/74891_0s.png)
C#实现启动项管理的示例代码
2022-07-30 09:09:04
![](https://img.aspxhome.com/file/2023/2/87052_0s.png)