SpringBoot-Redis 框架集成2

上次说过了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

参考文档: http://www.runoob.com/redis/redis-data-types.html

相关文章
相关标签/搜索