diff --git a/jraft-core/src/main/java/com/alipay/sofa/jraft/conf/Configuration.java b/jraft-core/src/main/java/com/alipay/sofa/jraft/conf/Configuration.java index 71759806b..c55c822a3 100644 --- a/jraft-core/src/main/java/com/alipay/sofa/jraft/conf/Configuration.java +++ b/jraft-core/src/main/java/com/alipay/sofa/jraft/conf/Configuration.java @@ -297,7 +297,7 @@ public boolean parse(final String conf) { peerStr = peerStr.substring(0, index); isLearner = true; } - if (peer.parse(peerStr)) { + if (peer.parse(StringUtils.trim(peerStr))) { if (isLearner) { addLearner(peer); } else {