解决springmvc启动报错:redis.client.jedis.exceptions.JedisDataException: ERR unknown command 'CONFIG', with args beginning with: `GET`, `notify-keyspace-events`
一 redis配置
rename-command flushdb ""
rename-command flushall ""
rename-command config "dba_config"
rename-command shutdown "dba_shutdown"
二 springmvc启动后报错
redis.client.jedis.exceptions.JedisDataException: ERR unknown command 'CONFIG', with args beginning with: `GET`, `notify-keyspace-events`
三 解决办法
3.1 方法一:修改redis.conf配置
3.2 方法二:修改spring.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<util:constant static-field="org.springframework.session.data.redis.config.ConfigureRedisAction.NO_OP"/>
</beans>