redis 增加配置控制是否调用config命令

This commit is contained in:
648540858
2021-12-20 15:14:34 +08:00
parent 344692640c
commit 89956873d7
6 changed files with 45 additions and 6 deletions

View File

@@ -37,10 +37,17 @@ public class ZLMKeepliveTimeoutListener extends KeyExpirationEventMessageListene
@Autowired
private IMediaServerService mediaServerService;
@Override
public void init() {
if (!userSetup.getRedisConfig()) {
// 配置springboot默认Config为空即不让应用去修改redis的默认配置因为Redis服务出于安全会禁用CONFIG命令给远程用户使用
setKeyspaceNotificationsConfigParameter("");
}
super.init();
}
public ZLMKeepliveTimeoutListener(RedisMessageListenerContainer listenerContainer) {
super(listenerContainer);
// 配置springboot默认Config为空即不让应用去修改redis的默认配置因为Redis服务出于安全会禁用CONFIG命令给远程用户使用
// setKeyspaceNotificationsConfigParameter("");
}
/**