Open fifthangel opened 1 year ago
RedisLettuceAutoConfiguration initCache 方法中,List uriList = map.values().stream().map((k) -> RedisURI.create(URI.create(k.toString()))) .collect(Collectors.toList());
io.lettuce.core.RedisURI.create下默认截取URI中第一个@符号前的字符做为登录密码,并非取最后一个@符号前做为密码。
String userInfo = uri.getUserInfo(); if (isEmpty(userInfo) && isNotEmpty(uri.getAuthority()) && uri.getAuthority().indexOf('@') > 0) { userInfo = uri.getAuthority().substring(0, uri.getAuthority().indexOf('@')); }
导致 io.lettuce.core.RedisConnectionException: Unable to connect to xxx@host:port 异常。
是否可提供 host + port +password 与 URI 两种连接方式 能力?
看描述我只大概知道是什么意思,这个还是自己想办法吧
我理解是没有做转义吧
RedisLettuceAutoConfiguration initCache 方法中,List uriList = map.values().stream().map((k) -> RedisURI.create(URI.create(k.toString()))) .collect(Collectors.toList());
io.lettuce.core.RedisURI.create下默认截取URI中第一个@符号前的字符做为登录密码,并非取最后一个@符号前做为密码。
导致 io.lettuce.core.RedisConnectionException: Unable to connect to xxx@host:port 异常。
是否可提供 host + port +password 与 URI 两种连接方式 能力?