Redis(附Win10版本 和可視化工具)

啓動服務端

經過win+r,cmd 運行命令行
而後輸入以下指令:redis

G: cd software cd G:\software\redis-64.3.0.503 redis-server.exe

這樣就啓動了服務端spring

啓動客戶端

經過win+r,cmd 運行命令行
而後輸入以下指令:數據庫

 
G: cd software cd G:\software\redis-64.3.0.503 redis-cli.exe


 這樣就會如圖所示經過客戶端訪問 redis 服務器服務器

簡單運用app

輸入指令:spring-boot

 
set hero gareen get hero

如此就實現了向服務器設置 hero 這個鍵值,並從服務器獲取hero對應的值工具

 

 安裝包 win10

下載完放到相應磁盤直接用64位spa

連接:https://pan.baidu.com/s/1t-ngjsHRzPJfVxyTSMgPfQ
提取碼:033w 命令行

可視化工具

連接:https://pan.baidu.com/s/1fyk9Hd2nVk-J7yVNaxBWeQ
提取碼:b57z 3d

 

 

點擊菜單 -> Server -> Add 就會出現這個界面。
大多數時候都是連接本機,因此 Name 輸入 localhost
Host 輸入 127.0.0.1
密碼默認爲空,而後點擊ok就行

剛剛接觸  這兩個配套使用    以本身電腦爲準(本身配置)

SpringBoot 配置

application.properties

###########################redis######################### #Redis數據庫索引(默認爲0) spring.redis.database=0 #Redis服務器地址 spring.redis.host=127.0.0.1 #Redis服務器鏈接端口 spring.redis.port=6379 #Redis服務器鏈接密碼(默認爲空) spring.redis.password= #鏈接池最大鏈接數(使用負值表示沒有限制) spring.redis.pool.max-active=10 #鏈接池最大阻塞等待時間(使用負值表示沒有限制) spring.redis.pool.max-wait=-1 #鏈接池中的最大空閒鏈接 spring.redis.pool.max-idle=8 #鏈接池中的最小空閒鏈接 spring.redis.pool.min-idle=0 #鏈接超時時間(毫秒) spring.redis.timeout=0

 

          <!-- redis -->       
         < dependency >
             < groupId >org.springframework.boot</ groupId >
             < artifactId >spring-boot-starter-data-redis</ artifactId >
         </ dependency >       
         < dependency >
相關文章
相關標籤/搜索