From 44ec35cbdfca6be98cb0cefd46c4a0e52ce7e59e Mon Sep 17 00:00:00 2001 From: "pdkst.zhang" Date: Tue, 8 Jun 2021 14:13:46 +0800 Subject: [PATCH 1/5] add shared contexts properties --- .../consul/config/ConsulConfigProperties.java | 50 ++++++++++++------- .../config/ConsulPropertySourceLocator.java | 22 ++++---- .../consul/config/ConsulPropertySources.java | 48 +++++++++--------- 3 files changed, 69 insertions(+), 51 deletions(-) diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java index 87513b922..15f05418d 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java @@ -16,14 +16,6 @@ package org.springframework.cloud.consul.config; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import javax.annotation.PostConstruct; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; - import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; @@ -31,6 +23,13 @@ import org.springframework.util.CollectionUtils; import org.springframework.validation.annotation.Validated; +import javax.annotation.PostConstruct; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import static org.springframework.cloud.consul.config.ConsulConfigProperties.PREFIX; /** @@ -80,6 +79,8 @@ public class ConsulConfigProperties { */ private String name; + private String[] sharedContexts; + public ConsulConfigProperties() { } @@ -107,7 +108,7 @@ public void setPrefixes(List prefixes) { } @DeprecatedConfigurationProperty(reason = "replaced to support multiple prefixes", - replacement = PREFIX + ".prefixes") + replacement = PREFIX + ".prefixes") public String getPrefix() { if (CollectionUtils.isEmpty(this.prefixes)) { return null; @@ -119,8 +120,7 @@ public String getPrefix() { public void setPrefix(String prefix) { if (prefix != null) { this.prefixes = new ArrayList<>(Collections.singletonList(prefix)); - } - else { + } else { this.prefixes = new ArrayList<>(); } } @@ -189,12 +189,22 @@ public void setName(String name) { this.name = name; } + public String[] getSharedContexts() { + return sharedContexts; + } + + public void setSharedContexts(String[] sharedContexts) { + this.sharedContexts = sharedContexts; + } + @Override public String toString() { return new ToStringCreator(this).append("enabled", this.enabled).append("prefixes", this.prefixes) - .append("defaultContext", this.defaultContext).append("profileSeparator", this.profileSeparator) - .append("format", this.format).append("dataKey", this.dataKey).append("aclToken", this.aclToken) - .append("watch", this.watch).append("failFast", this.failFast).append("name", this.name).toString(); + .append("defaultContext", this.defaultContext).append("profileSeparator", this.profileSeparator) + .append("format", this.format).append("dataKey", this.dataKey).append("aclToken", this.aclToken) + .append("watch", this.watch).append("failFast", this.failFast) + .append("name", this.name).append("sharedContexts", this.sharedContexts) + .toString(); } /** @@ -212,7 +222,7 @@ public String toString() { * as whole configuration " a.b.c=something a.b.d=something else " *
  • as Json or YML. You get it.
  • * - * + *

    * This enum specifies the different Formats/styles supported for loading the * configuration. * @@ -260,10 +270,14 @@ public static class Watch { */ private int waitTime = 55; - /** If the watch is enabled. Defaults to true. */ + /** + * If the watch is enabled. Defaults to true. + */ private boolean enabled = true; - /** The value of the fixed delay for the watch in millis. Defaults to 1000. */ + /** + * The value of the fixed delay for the watch in millis. Defaults to 1000. + */ private int delay = 1000; public Watch() { @@ -296,7 +310,7 @@ public void setDelay(int delay) { @Override public String toString() { return new ToStringCreator(this).append("waitTime", this.waitTime).append("enabled", this.enabled) - .append("delay", this.delay).toString(); + .append("delay", this.delay).toString(); } } diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java index ee572fb48..410138f70 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java @@ -16,16 +16,9 @@ package org.springframework.cloud.consul.config; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.List; - import com.ecwid.consul.v1.ConsulClient; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - import org.springframework.cloud.bootstrap.config.PropertySourceLocator; import org.springframework.core.annotation.Order; import org.springframework.core.env.CompositePropertySource; @@ -34,6 +27,8 @@ import org.springframework.core.env.PropertySource; import org.springframework.retry.annotation.Retryable; +import java.util.*; + /** * @author Spencer Gibb */ @@ -50,9 +45,18 @@ public class ConsulPropertySourceLocator implements PropertySourceLocator, Consu private final LinkedHashMap contextIndex = new LinkedHashMap<>(); + private final ConsulPropertySources sources; + public ConsulPropertySourceLocator(ConsulClient consul, ConsulConfigProperties properties) { this.consul = consul; this.properties = properties; + sources = new ConsulPropertySources(properties, log); + } + + public ConsulPropertySourceLocator(ConsulClient consul, ConsulConfigProperties properties, ConsulPropertySources sources) { + this.consul = consul; + this.properties = properties; + this.sources = sources; } @Deprecated @@ -77,8 +81,6 @@ public PropertySource locate(Environment environment) { if (environment instanceof ConfigurableEnvironment) { ConfigurableEnvironment env = (ConfigurableEnvironment) environment; - ConsulPropertySources sources = new ConsulPropertySources(properties, log); - List profiles = Arrays.asList(env.getActiveProfiles()); this.contexts.addAll(sources.getAutomaticContexts(profiles)); @@ -86,7 +88,7 @@ public PropertySource locate(Environment environment) { for (String propertySourceContext : this.contexts) { ConsulPropertySource propertySource = sources.createPropertySource(propertySourceContext, this.consul, - contextIndex::put); + contextIndex::put); if (propertySource != null) { composite.addPropertySource(propertySource); } diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java index 0e945a412..781e6b15a 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java @@ -16,21 +16,20 @@ package org.springframework.cloud.consul.config; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.function.BiConsumer; -import java.util.stream.Collectors; - import com.ecwid.consul.v1.ConsulClient; import com.ecwid.consul.v1.Response; import com.ecwid.consul.v1.kv.model.GetValue; import org.apache.commons.logging.Log; - import org.springframework.core.style.ToStringCreator; import org.springframework.util.StringUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.function.BiConsumer; +import java.util.stream.Collectors; + import static org.springframework.cloud.consul.config.ConsulConfigProperties.Format.FILES; public class ConsulPropertySources { @@ -38,7 +37,7 @@ public class ConsulPropertySources { protected static final List DIR_SUFFIXES = Collections.singletonList("/"); protected static final List FILES_SUFFIXES = Collections - .unmodifiableList(Arrays.asList(".yml", ".yaml", ".properties")); + .unmodifiableList(Arrays.asList(".yml", ".yaml", ".properties")); private final ConsulConfigProperties properties; @@ -60,6 +59,14 @@ public List getAutomaticContexts(List profiles, boolean reverse) public List generateAutomaticContexts(List profiles, boolean reverse) { List contexts = new ArrayList<>(); for (String prefix : this.properties.getPrefixes()) { + // contexts which shared with each other + final String[] sharedContexts = properties.getSharedContexts(); + if (sharedContexts != null) { + for (String sharedContext : sharedContexts) { + contexts.add(new Context(getContext(prefix, sharedContext))); + } + } + String defaultContext = getContext(prefix, properties.getDefaultContext()); List suffixes = getSuffixes(); for (String suffix : suffixes) { @@ -89,8 +96,7 @@ public List generateAutomaticContexts(List profiles, boolean re protected String getContext(String prefix, String context) { if (!StringUtils.hasText(prefix)) { return context; - } - else { + } else { return prefix + "/" + context; } } @@ -111,12 +117,12 @@ private void addProfiles(List contexts, String baseContext, List indexConsumer) { + ConsulClient consul, BiConsumer indexConsumer) { return createPropertySource(propertySourceContext, consul, indexConsumer); } public ConsulPropertySource createPropertySource(String propertySourceContext, ConsulClient consul, - BiConsumer indexConsumer) { + BiConsumer indexConsumer) { try { ConsulPropertySource propertySource = null; @@ -125,24 +131,20 @@ public ConsulPropertySource createPropertySource(String propertySourceContext, C indexConsumer.accept(propertySourceContext, response.getConsulIndex()); if (response.getValue() != null) { ConsulFilesPropertySource filesPropertySource = new ConsulFilesPropertySource(propertySourceContext, - consul, properties); + consul, properties); filesPropertySource.init(response.getValue()); propertySource = filesPropertySource; } - } - else { + } else { propertySource = create(propertySourceContext, consul, indexConsumer); } return propertySource; - } - catch (PropertySourceNotFoundException e) { + } catch (PropertySourceNotFoundException e) { throw e; - } - catch (Exception e) { + } catch (Exception e) { if (properties.isFailFast()) { throw new PropertySourceNotFoundException(propertySourceContext, e); - } - else { + } else { log.warn("Unable to load consul config from " + propertySourceContext, e); } } @@ -150,7 +152,7 @@ public ConsulPropertySource createPropertySource(String propertySourceContext, C } private ConsulPropertySource create(String context, ConsulClient consulClient, - BiConsumer indexConsumer) { + BiConsumer indexConsumer) { ConsulPropertySource propertySource = new ConsulPropertySource(context, consulClient, this.properties); propertySource.init(); indexConsumer.accept(context, propertySource.getInitialIndex()); From 16888109e35fd84ae12cb2bf0a046e6194872cf4 Mon Sep 17 00:00:00 2001 From: "pdkst.zhang" Date: Tue, 8 Jun 2021 14:16:08 +0800 Subject: [PATCH 2/5] add sharedContexts comments --- .../cloud/consul/config/ConsulConfigProperties.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java index 15f05418d..aeea6b893 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java @@ -79,6 +79,9 @@ public class ConsulConfigProperties { */ private String name; + /** + * contexts which shared with each other, lowest priority + */ private String[] sharedContexts; public ConsulConfigProperties() { From c2c02c7ab87ea984602004f12277f6364af5b191 Mon Sep 17 00:00:00 2001 From: "pdkst.zhang" Date: Tue, 8 Jun 2021 14:22:14 +0800 Subject: [PATCH 3/5] rollback unnecessary changes --- .../consul/config/ConsulConfigProperties.java | 25 ++++++++----------- .../config/ConsulPropertySourceLocator.java | 8 ++++-- .../consul/config/ConsulPropertySources.java | 15 +++++------ 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java index aeea6b893..de4ba0866 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java @@ -16,6 +16,14 @@ package org.springframework.cloud.consul.config; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import javax.annotation.PostConstruct; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; @@ -23,13 +31,6 @@ import org.springframework.util.CollectionUtils; import org.springframework.validation.annotation.Validated; -import javax.annotation.PostConstruct; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - import static org.springframework.cloud.consul.config.ConsulConfigProperties.PREFIX; /** @@ -225,7 +226,7 @@ public String toString() { * as whole configuration " a.b.c=something a.b.d=something else " *

  • as Json or YML. You get it.
  • * - *

    + * * This enum specifies the different Formats/styles supported for loading the * configuration. * @@ -273,14 +274,10 @@ public static class Watch { */ private int waitTime = 55; - /** - * If the watch is enabled. Defaults to true. - */ + /** If the watch is enabled. Defaults to true. */ private boolean enabled = true; - /** - * The value of the fixed delay for the watch in millis. Defaults to 1000. - */ + /** The value of the fixed delay for the watch in millis. Defaults to 1000. */ private int delay = 1000; public Watch() { diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java index 410138f70..c5e35ec27 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java @@ -16,6 +16,12 @@ package org.springframework.cloud.consul.config; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; + import com.ecwid.consul.v1.ConsulClient; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -27,8 +33,6 @@ import org.springframework.core.env.PropertySource; import org.springframework.retry.annotation.Retryable; -import java.util.*; - /** * @author Spencer Gibb */ diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java index 781e6b15a..83db36e89 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java @@ -16,13 +16,6 @@ package org.springframework.cloud.consul.config; -import com.ecwid.consul.v1.ConsulClient; -import com.ecwid.consul.v1.Response; -import com.ecwid.consul.v1.kv.model.GetValue; -import org.apache.commons.logging.Log; -import org.springframework.core.style.ToStringCreator; -import org.springframework.util.StringUtils; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -30,6 +23,14 @@ import java.util.function.BiConsumer; import java.util.stream.Collectors; +import com.ecwid.consul.v1.ConsulClient; +import com.ecwid.consul.v1.Response; +import com.ecwid.consul.v1.kv.model.GetValue; +import org.apache.commons.logging.Log; + +import org.springframework.core.style.ToStringCreator; +import org.springframework.util.StringUtils; + import static org.springframework.cloud.consul.config.ConsulConfigProperties.Format.FILES; public class ConsulPropertySources { From a3cc2f4d80952d6c9c7caf61833de7495da54a77 Mon Sep 17 00:00:00 2001 From: "pdkst.zhang" Date: Tue, 8 Jun 2021 14:36:59 +0800 Subject: [PATCH 4/5] rollback blanks --- .../consul/config/ConsulConfigProperties.java | 7 +++--- .../config/ConsulPropertySourceLocator.java | 3 ++- .../consul/config/ConsulPropertySources.java | 25 +++++++++++-------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java index de4ba0866..d335fc582 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java @@ -112,7 +112,7 @@ public void setPrefixes(List prefixes) { } @DeprecatedConfigurationProperty(reason = "replaced to support multiple prefixes", - replacement = PREFIX + ".prefixes") + replacement = PREFIX + ".prefixes") public String getPrefix() { if (CollectionUtils.isEmpty(this.prefixes)) { return null; @@ -124,7 +124,8 @@ public String getPrefix() { public void setPrefix(String prefix) { if (prefix != null) { this.prefixes = new ArrayList<>(Collections.singletonList(prefix)); - } else { + } + else { this.prefixes = new ArrayList<>(); } } @@ -310,7 +311,7 @@ public void setDelay(int delay) { @Override public String toString() { return new ToStringCreator(this).append("waitTime", this.waitTime).append("enabled", this.enabled) - .append("delay", this.delay).toString(); + .append("delay", this.delay).toString(); } } diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java index c5e35ec27..8d8dcd9dc 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySourceLocator.java @@ -25,6 +25,7 @@ import com.ecwid.consul.v1.ConsulClient; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.cloud.bootstrap.config.PropertySourceLocator; import org.springframework.core.annotation.Order; import org.springframework.core.env.CompositePropertySource; @@ -92,7 +93,7 @@ public PropertySource locate(Environment environment) { for (String propertySourceContext : this.contexts) { ConsulPropertySource propertySource = sources.createPropertySource(propertySourceContext, this.consul, - contextIndex::put); + contextIndex::put); if (propertySource != null) { composite.addPropertySource(propertySource); } diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java index 83db36e89..9f9eaaf12 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySources.java @@ -38,7 +38,7 @@ public class ConsulPropertySources { protected static final List DIR_SUFFIXES = Collections.singletonList("/"); protected static final List FILES_SUFFIXES = Collections - .unmodifiableList(Arrays.asList(".yml", ".yaml", ".properties")); + .unmodifiableList(Arrays.asList(".yml", ".yaml", ".properties")); private final ConsulConfigProperties properties; @@ -97,7 +97,8 @@ public List generateAutomaticContexts(List profiles, boolean re protected String getContext(String prefix, String context) { if (!StringUtils.hasText(prefix)) { return context; - } else { + } + else { return prefix + "/" + context; } } @@ -118,12 +119,12 @@ private void addProfiles(List contexts, String baseContext, List indexConsumer) { + ConsulClient consul, BiConsumer indexConsumer) { return createPropertySource(propertySourceContext, consul, indexConsumer); } public ConsulPropertySource createPropertySource(String propertySourceContext, ConsulClient consul, - BiConsumer indexConsumer) { + BiConsumer indexConsumer) { try { ConsulPropertySource propertySource = null; @@ -132,20 +133,24 @@ public ConsulPropertySource createPropertySource(String propertySourceContext, C indexConsumer.accept(propertySourceContext, response.getConsulIndex()); if (response.getValue() != null) { ConsulFilesPropertySource filesPropertySource = new ConsulFilesPropertySource(propertySourceContext, - consul, properties); + consul, properties); filesPropertySource.init(response.getValue()); propertySource = filesPropertySource; } - } else { + } + else { propertySource = create(propertySourceContext, consul, indexConsumer); } return propertySource; - } catch (PropertySourceNotFoundException e) { + } + catch (PropertySourceNotFoundException e) { throw e; - } catch (Exception e) { + } + catch (Exception e) { if (properties.isFailFast()) { throw new PropertySourceNotFoundException(propertySourceContext, e); - } else { + } + else { log.warn("Unable to load consul config from " + propertySourceContext, e); } } @@ -153,7 +158,7 @@ public ConsulPropertySource createPropertySource(String propertySourceContext, C } private ConsulPropertySource create(String context, ConsulClient consulClient, - BiConsumer indexConsumer) { + BiConsumer indexConsumer) { ConsulPropertySource propertySource = new ConsulPropertySource(context, consulClient, this.properties); propertySource.init(); indexConsumer.accept(context, propertySource.getInitialIndex()); From c161533322d44077531ef407eeeffac92b1fdd21 Mon Sep 17 00:00:00 2001 From: "pdkst.zhang" Date: Tue, 8 Jun 2021 16:12:25 +0800 Subject: [PATCH 5/5] add . --- .../cloud/consul/config/ConsulConfigProperties.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java index d335fc582..08239781e 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java @@ -81,7 +81,7 @@ public class ConsulConfigProperties { private String name; /** - * contexts which shared with each other, lowest priority + * contexts which shared with each other, lowest priority. */ private String[] sharedContexts; @@ -205,11 +205,10 @@ public void setSharedContexts(String[] sharedContexts) { @Override public String toString() { return new ToStringCreator(this).append("enabled", this.enabled).append("prefixes", this.prefixes) - .append("defaultContext", this.defaultContext).append("profileSeparator", this.profileSeparator) - .append("format", this.format).append("dataKey", this.dataKey).append("aclToken", this.aclToken) - .append("watch", this.watch).append("failFast", this.failFast) - .append("name", this.name).append("sharedContexts", this.sharedContexts) - .toString(); + .append("defaultContext", this.defaultContext).append("profileSeparator", this.profileSeparator) + .append("format", this.format).append("dataKey", this.dataKey).append("aclToken", this.aclToken) + .append("watch", this.watch).append("failFast", this.failFast).append("name", this.name) + .append("sharedContexts", this.sharedContexts).toString(); } /**