@Test public void setsPasswordFromUrl() throws Exception { factory.setUrl(new URI("redis: assertThat(factory).hasPassword("swordfish"); }
@JsonProperty public void setUrl(URI uri) { this.endpoint = HostAndPort.fromParts(uri.getHost(), uri.getPort()); String userInfo = uri.getUserInfo(); if (userInfo != null && !userInfo.isEmpty()) { String[] credentials = userInfo.split(":"); this.password = credentials[1]; } if (uri.getScheme().equals(REDIS_SSL)) { this.ssl = true; } }
JedisFactory { @JsonProperty public void setUrl(URI uri) { this.endpoint = HostAndPort.fromParts(uri.getHost(), uri.getPort()); String userInfo = uri.getUserInfo(); if (userInfo != null && !userInfo.isEmpty()) { String[] credentials = userInfo.split(":"); this.password = credentials[1]; } if (uri.getScheme().equals(REDIS_SSL)) { this.ssl = true; } } }
JedisFactory { @JsonProperty public void setUrl(URI uri) { this.endpoint = HostAndPort.fromParts(uri.getHost(), uri.getPort()); String userInfo = uri.getUserInfo(); if (userInfo != null && !userInfo.isEmpty()) { String[] credentials = userInfo.split(":"); this.password = credentials[1]; } if (uri.getScheme().equals(REDIS_SSL)) { this.ssl = true; } }  }
JedisFactory { @JsonProperty public void setUrl(URI uri) { this.endpoint = HostAndPort.fromParts(uri.getHost(), uri.getPort()); String userInfo = uri.getUserInfo(); if (userInfo != null && !userInfo.isEmpty()) { String[] credentials = userInfo.split(":"); this.password = credentials[1]; } if (uri.getScheme().equals(REDIS_SSL)) { this.ssl = true; } }  @JsonProperty void setUrl(URI uri); HostAndPort getEndpoint(); void setEndpoint(HostAndPort endpoint); String getHost(); int getPort(); String getPassword(); void setPassword(String password); int getMinIdle(); void setMinIdle(int minIdle); int getMaxIdle(); void setMaxIdle(int maxIdle); int getMaxTotal(); void setMaxTotal(int maxTotal); boolean getSsl(); void setSsl(boolean ssl); int getTimeout(); void setTimeout(int timeout); JedisPool build(Environment environment); }
JedisFactory { @JsonProperty public void setUrl(URI uri) { this.endpoint = HostAndPort.fromParts(uri.getHost(), uri.getPort()); String userInfo = uri.getUserInfo(); if (userInfo != null && !userInfo.isEmpty()) { String[] credentials = userInfo.split(":"); this.password = credentials[1]; } if (uri.getScheme().equals(REDIS_SSL)) { this.ssl = true; } }  @JsonProperty void setUrl(URI uri); HostAndPort getEndpoint(); void setEndpoint(HostAndPort endpoint); String getHost(); int getPort(); String getPassword(); void setPassword(String password); int getMinIdle(); void setMinIdle(int minIdle); int getMaxIdle(); void setMaxIdle(int maxIdle); int getMaxTotal(); void setMaxTotal(int maxTotal); boolean getSsl(); void setSsl(boolean ssl); int getTimeout(); void setTimeout(int timeout); JedisPool build(Environment environment); static final int DEFAULT_PORT; static final int DEFAULT_MAX_TOTAL; }