Remove duplicate spring.application.name from default node id

This commit is contained in:
Dave Syer
2018-02-16 09:29:07 +00:00
parent 509a216258
commit 3ee4f80350

View File

@@ -52,7 +52,7 @@ public class BusEnvironmentPostProcessor implements EnvironmentPostProcessor {
// TODO: move this to commons
private String getDefaultServiceId(ConfigurableEnvironment environment) {
return "${vcap.application.name:${spring.application.name:${spring.application.name:application}}}:${vcap.application.instance_index:${spring.application.index:${local.server.port:${server.port:0}}}}:${vcap.application.instance_id:${random.value}}";
return "${vcap.application.name:${spring.application.name:application}}:${vcap.application.instance_index:${spring.application.index:${local.server.port:${server.port:0}}}}:${vcap.application.instance_id:${random.value}}";
}
private void addOrReplace(MutablePropertySources propertySources,