java Spring Boot 配置redis pom文件操作
1.創(chuàng)建一個(gè)redis maven項(xiàng)目,在pom中添加如下信息
spring boot 版本
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.4.RELEASE</version></parent>
項(xiàng)目相關(guān)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>
補(bǔ)充知識(shí):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)容了,希望能給大家一個(gè)參考,也希望大家多多支持好吧啦網(wǎng)。
相關(guān)文章:
1. 什么是Python變量作用域2. Android 實(shí)現(xiàn)徹底退出自己APP 并殺掉所有相關(guān)的進(jìn)程3. Vue實(shí)現(xiàn)仿iPhone懸浮球的示例代碼4. js select支持手動(dòng)輸入功能實(shí)現(xiàn)代碼5. Android studio 解決logcat無過濾工具欄的操作6. vue使用moment如何將時(shí)間戳轉(zhuǎn)為標(biāo)準(zhǔn)日期時(shí)間格式7. bootstrap select2 動(dòng)態(tài)從后臺(tái)Ajax動(dòng)態(tài)獲取數(shù)據(jù)的代碼8. 一個(gè) 2 年 Android 開發(fā)者的 18 條忠告9. PHP正則表達(dá)式函數(shù)preg_replace用法實(shí)例分析10. vue-drag-chart 拖動(dòng)/縮放圖表組件的實(shí)例代碼
