java Spring Boot 配置redis pom文件操作
1.創(chuàng)建一個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> <!-- 熱開發(fā)注解 --> <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>
以上這篇java Spring Boot 配置redis pom文件操作就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持好吧啦網(wǎng)。
相關文章:
1. python GUI庫圖形界面開發(fā)之PyQt5動態(tài)(可拖動控件大小)布局控件QSplitter詳細使用方法與實例2. CSS3實例分享之多重背景的實現(xiàn)(Multiple backgrounds)3. js開發(fā)中的頁面、屏幕、瀏覽器的位置原理(高度寬度)說明講解(附圖)4. CSS清除浮動方法匯總5. 不要在HTML中濫用div6. XML入門的常見問題(三)7. Python數(shù)據(jù)分析JupyterNotebook3魔法命令詳解及示例8. ASP動態(tài)include文件9. ASP將數(shù)字轉(zhuǎn)中文數(shù)字(大寫金額)的函數(shù)10. vue跳轉(zhuǎn)頁面常用的幾種方法匯總
