上次說過了Redis在SpringBoot中的配置及使用,但若是電腦或者服務器沒有安裝或打開Redis服務器,那麼訪問接口就會報:html
There was an unexpected error (type=Internal Server Error, status=500). Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
的錯誤消息;git
此次咱們就來看看Window下關於Redis客戶端的安裝:github
1: 下載Redis客戶端安裝包:redis
Redis下載地址: https://github.com/MicrosoftArchive/redis/releases apache
2: 下載成功後,解壓就能夠啦;windows
而後打開命令行,定位到解壓後的目錄中,而後運行命令: bash
#1: 在cmd下找到redis安裝文件的目錄: cd C:\PortableSoft\Redis\redis #2: 執行啓動操做: redis-server.exe redis.windows.conf #3: 啓動成功後不要關閉這個cmd;
當命令行變爲:服務器
就啓動成功,在次訪問項目接口,就能夠訪問成功;ide
一款Redis可視化工具: https://github.com/uglide/RedisDesktopManager/releases工具
Redis官網: https://redis.io/clients