@@ -98,9 +98,9 @@ public class LettuceConnectionFactory implements InitializingBean, DisposableBea
98
98
private RedisClusterConfiguration clusterConfiguration ;
99
99
private ClusterCommandExecutor clusterCommandExecutor ;
100
100
private ClientResources clientResources ;
101
- private boolean useSsl ;
101
+ private boolean useSsl = false ;
102
102
private boolean verifyPeer = true ;
103
- private boolean startTls ;
103
+ private boolean startTls = false ;
104
104
105
105
/**
106
106
* Constructs a new <code>LettuceConnectionFactory</code> instance with default settings.
@@ -323,14 +323,14 @@ public void setUseSsl(boolean useSsl) {
323
323
/**
324
324
* Returns whether to use SSL.
325
325
*
326
- * @return
326
+ * @return use of SSL
327
327
*/
328
328
public boolean isUseSsl () {
329
329
return useSsl ;
330
330
}
331
331
332
332
/**
333
- * Sets to use verify certificate validity/hostname check when SSL is used
333
+ * Sets to use verify certificate validity/hostname check when SSL is used.
334
334
*
335
335
* @param verifyPeer {@literal false} not to verify hostname.
336
336
*/
@@ -339,35 +339,34 @@ public void setVerifyPeer(boolean verifyPeer) {
339
339
}
340
340
341
341
/**
342
- * Returns whether to verify certificate validity/hostname check when SSL is used
342
+ * Returns whether to verify certificate validity/hostname check when SSL is used.
343
343
*
344
- * @return
344
+ * @return verify peers when using SSL
345
345
*/
346
346
public boolean isVerifyPeer () {
347
347
return verifyPeer ;
348
348
}
349
349
350
350
/**
351
- * Returns whether to issue a StartTLS
351
+ * Returns whether to issue a StartTLS.
352
352
*
353
- * @return
354
- */
353
+ * @return use of StartTLS
354
+ */
355
355
public boolean isStartTls () {
356
356
return startTls ;
357
357
}
358
358
359
-
360
359
/**
361
- * Sets to issue StartTLS
360
+ * Sets to issue StartTLS.
362
361
*
363
- * @param startTls {@literal true} to issue StartTLS
364
- */
362
+ * @param startTls {@literal true} to issue StartTLS.
363
+ */
365
364
public void setStartTls (boolean startTls ) {
366
365
this .startTls = startTls ;
367
366
}
368
367
369
368
/**
370
- * Indicates if validation of the native Lettuce connection is enabled
369
+ * Indicates if validation of the native Lettuce connection is enabled.
371
370
*
372
371
* @return connection validation enabled
373
372
*/
@@ -594,10 +593,12 @@ private AbstractRedisClient createRedisClient() {
594
593
if (password != null ) {
595
594
builder .withPassword (password );
596
595
}
596
+
597
597
builder .withSsl (useSsl );
598
598
builder .withVerifyPeer (verifyPeer );
599
599
builder .withStartTls (startTls );
600
600
builder .withTimeout (timeout , TimeUnit .MILLISECONDS );
601
+
601
602
if (clientResources != null ) {
602
603
return RedisClient .create (clientResources , builder .build ());
603
604
}
0 commit comments