From 92ca2325188a3852ed2df79166cd68591bd4e61b Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Mon, 26 Mar 2018 14:58:47 +0000
Subject: [PATCH 01/41] Update SNAPSHOT to 1.3.3.RELEASE
---
docs/pom.xml | 2 +-
pom.xml | 2 +-
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 66f5d56a..7934b347 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.3.RELEASEpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 14c8c492..0eb99868 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.3.RELEASEpomSpring Cloud Commons ParentSpring Cloud Commons Parent
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 053df5e4..72a4ffcf 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 1.3.8.BUILD-SNAPSHOT
+ 1.3.8.RELEASEspring-cloud-commons-dependencies
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.3.RELEASEpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index ba11f0d7..2ac674ca 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.3.RELEASE..spring-cloud-commons
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 1cc99e58..38e9820c 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.3.RELEASE..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 4da17ff3..ca30ecef 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.3.RELEASEspring-cloud-starterspring-cloud-starter
From 7219560a1fea1b8ed8a4d230acfde4d1d7bc58b7 Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Mon, 26 Mar 2018 15:04:09 +0000
Subject: [PATCH 02/41] Going back to snapshots
---
docs/pom.xml | 2 +-
pom.xml | 2 +-
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 7934b347..66f5d56a 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.RELEASE
+ 1.3.3.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 0eb99868..14c8c492 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.RELEASE
+ 1.3.3.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 72a4ffcf..053df5e4 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 1.3.8.RELEASE
+ 1.3.8.BUILD-SNAPSHOTspring-cloud-commons-dependencies
- 1.3.3.RELEASE
+ 1.3.3.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 2ac674ca..ba11f0d7 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.RELEASE
+ 1.3.3.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 38e9820c..1cc99e58 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.RELEASE
+ 1.3.3.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index ca30ecef..4da17ff3 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.RELEASE
+ 1.3.3.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
From f71e5a3eaf2042dd241ecfad31e10f13bf458f2f Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Mon, 26 Mar 2018 15:04:10 +0000
Subject: [PATCH 03/41] Bumping versions to 1.3.4.BUILD-SNAPSHOT after release
---
docs/pom.xml | 2 +-
pom.xml | 2 +-
spring-cloud-commons-dependencies/pom.xml | 2 +-
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 66f5d56a..86e8723a 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.4.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 14c8c492..7d2886dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.4.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 053df5e4..cd89d5f5 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -9,7 +9,7 @@
spring-cloud-commons-dependencies
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.4.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index ba11f0d7..c091e904 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.4.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 1cc99e58..b400a1b9 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.4.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 4da17ff3..8f635929 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.3.BUILD-SNAPSHOT
+ 1.3.4.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
From b8c60382545ebdd82a08f0f4514f955330cc8836 Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Mon, 14 May 2018 13:27:57 -0400
Subject: [PATCH 04/41] Fixes #359
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index eb01aaf7..4cc98344 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -527,7 +527,7 @@ spring:
You can also force to use only specified network addresses using list of regular expressions:
-.application.yml
+.bootstrap.yml
----
spring:
cloud:
From 3a805334f20af9b9d36fe07dc2910f7826972c64 Mon Sep 17 00:00:00 2001
From: Fahim Farook
Date: Thu, 24 May 2018 02:30:12 +0530
Subject: [PATCH 05/41] Fixes failing maven eclipse:eclipse goal. (#372)
---
docs/pom.xml | 3 +-
eclipse/eclipse-code-formatter.xml | 315 ++++++++++++++++++++++
eclipse/org.eclipse.jdt.core.prefs | 412 +++++++++++++++++++++++++++++
eclipse/org.eclipse.jdt.ui.prefs | 125 +++++++++
pom.xml | 5 +-
spring-cloud-starter/pom.xml | 3 -
6 files changed, 855 insertions(+), 8 deletions(-)
create mode 100644 eclipse/eclipse-code-formatter.xml
create mode 100644 eclipse/org.eclipse.jdt.core.prefs
create mode 100644 eclipse/org.eclipse.jdt.ui.prefs
diff --git a/docs/pom.xml b/docs/pom.xml
index f42e0305..71e4757a 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -12,8 +12,7 @@
Spring Cloud Commons DocsSpring Cloud Commons Docs
- spring-cloud-commons
- ${basedir}/..
+ spring-cloud-commons1.1.x,1.2.x,1.3.x
diff --git a/eclipse/eclipse-code-formatter.xml b/eclipse/eclipse-code-formatter.xml
new file mode 100644
index 00000000..2586a2a2
--- /dev/null
+++ b/eclipse/eclipse-code-formatter.xml
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse/org.eclipse.jdt.core.prefs b/eclipse/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..fd349833
--- /dev/null
+++ b/eclipse/org.eclipse.jdt.core.prefs
@@ -0,0 +1,412 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=default
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=default
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.processAnnotations=disabled
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=false
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=90
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=90
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/eclipse/org.eclipse.jdt.ui.prefs b/eclipse/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000..e7f77db5
--- /dev/null
+++ b/eclipse/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,125 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=true
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=false
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=false
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=false
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=false
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Spring Cloud Cleanup Conventions
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Spring Cloud Java Conventions
+formatter_settings_version=13
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;;org.springframework;\#;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=9999
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=9999
+org.eclipse.jdt.ui.text.custom_code_templates=/**\n * @return the ${bare_field_name}\n *//**\n * @param ${param} the ${bare_field_name} to set\n *//**\n * ${tags}\n *//*\n * Copyright 2012-2018 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http\://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *//**\n * @author ${user}\n *//**\n * \n *//**\n * ${tags}\n *//* (non-Javadoc)\n * ${see_to_overridden}\n *//**\n * ${tags}\n * ${see_to_target}\n */${filecomment}\n\n${package_declaration}\n${typecomment}\n${type_declaration}\n\n\n\n// ${todo} Auto-generated catch block\nthrow new UnsupportedOperationException("Auto-generated method stub", ${exception_var});// ${todo} Auto-generated method stub\nthrow new UnsupportedOperationException("Auto-generated method stub");${body_statement}\n// ${todo} Auto-generated constructor stubreturn ${field};${field} \= ${param};
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=true
+sp_cleanup.always_use_this_for_non_static_field_access=true
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=false
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=false
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/pom.xml b/pom.xml
index fbb9b247..7849682d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,6 @@
HEAD
- .commons
@@ -34,11 +33,11 @@
.settings/org.eclipse.jdt.ui.prefs
- ${main.basedir}/eclipse/org.eclipse.jdt.ui.prefs
+ ${maven.multiModuleProjectDirectory}/eclipse/org.eclipse.jdt.ui.prefs.settings/org.eclipse.jdt.core.prefs
- ${main.basedir}/eclipse/org.eclipse.jdt.core.prefs
+ ${maven.multiModuleProjectDirectory}/eclipse/org.eclipse.jdt.core.prefs
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index b7770a02..b84653b5 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -15,9 +15,6 @@
Pivotal Software, Inc.https://www.spring.io
-
- ${basedir}/../..
- org.springframework.boot
From 445fffff340fbdc6878b145ce30fff854b317abc Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Thu, 24 May 2018 18:59:33 +0000
Subject: [PATCH 06/41] Update SNAPSHOT to 2.0.0.RC2
---
docs/README.adoc | 159 ++++++++++++++++++
docs/pom.xml | 2 +-
pom.xml | 4 +-
spring-cloud-commons-dependencies/pom.xml | 4 +-
spring-cloud-commons/pom.xml | 2 +-
.../pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
9 files changed, 169 insertions(+), 10 deletions(-)
create mode 100644 docs/README.adoc
diff --git a/docs/README.adoc b/docs/README.adoc
new file mode 100644
index 00000000..1aa7dfc3
--- /dev/null
+++ b/docs/README.adoc
@@ -0,0 +1,159 @@
+// Do not edit this file (e.g. go instead to src/main/asciidoc)
+
+image::https://circleci.com/gh/spring-cloud/spring-cloud-commons.svg?style=svg[Build Status, link=https://circleci.com/gh/spring-cloud/spring-cloud-commons]
+
+
+http://pivotal.io/platform-as-a-service/migrating-to-cloud-native-application-architectures-ebook[Cloud Native] is a style of application development that encourages easy adoption of best practices in the areas of continuous delivery and value-driven development.
+A related discipline is that of building http://12factor.net/[12-factor Applications], in which development practices are aligned with delivery and operations goals -- for instance, by using declarative programming and management and monitoring.
+Spring Cloud facilitates these styles of development in a number of specific ways.
+ The starting point is a set of features to which all components in a distributed system need easy access.
+
+Many of those features are covered by http://projects.spring.io/spring-boot[Spring Boot], on which Spring Cloud builds. Some more features are delivered by Spring Cloud as two libraries: Spring Cloud Context and Spring Cloud Commons.
+Spring Cloud Context provides utilities and special services for the `ApplicationContext` of a Spring Cloud application (bootstrap context, encryption, refresh scope, and environment endpoints). Spring Cloud Commons is a set of abstractions and common classes used in different Spring Cloud implementations (such as Spring Cloud Netflix and Spring Cloud Consul).
+
+If you get an exception due to "Illegal key size" and you use Sun's JDK, you need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.
+See the following links for more information:
+
+* http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html[Java 6 JCE]
+* http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html[Java 7 JCE]
+* http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html[Java 8 JCE]
+
+Extract the files into the JDK/jre/lib/security folder for whichever version of JRE/JDK x64/x86 you use.
+
+== Building
+
+:jdkversion: 1.7
+
+=== Basic Compile and Test
+
+To build the source you will need to install JDK {jdkversion}.
+
+Spring Cloud uses Maven for most build-related activities, and you
+should be able to get off the ground quite quickly by cloning the
+project you are interested in and typing
+
+----
+$ ./mvnw install
+----
+
+NOTE: You can also install Maven (>=3.3.3) yourself and run the `mvn` command
+in place of `./mvnw` in the examples below. If you do that you also
+might need to add `-P spring` if your local Maven settings do not
+contain repository declarations for spring pre-release artifacts.
+
+NOTE: Be aware that you might need to increase the amount of memory
+available to Maven by setting a `MAVEN_OPTS` environment variable with
+a value like `-Xmx512m -XX:MaxPermSize=128m`. We try to cover this in
+the `.mvn` configuration, so if you find you have to do it to make a
+build succeed, please raise a ticket to get the settings added to
+source control.
+
+For hints on how to build the project look in `.travis.yml` if there
+is one. There should be a "script" and maybe "install" command. Also
+look at the "services" section to see if any services need to be
+running locally (e.g. mongo or rabbit). Ignore the git-related bits
+that you might find in "before_install" since they're related to setting git
+credentials and you already have those.
+
+The projects that require middleware generally include a
+`docker-compose.yml`, so consider using
+http://compose.docker.io/[Docker Compose] to run the middeware servers
+in Docker containers. See the README in the
+https://github.com/spring-cloud-samples/scripts[scripts demo
+repository] for specific instructions about the common cases of mongo,
+rabbit and redis.
+
+NOTE: If all else fails, build with the command from `.travis.yml` (usually
+`./mvnw install`).
+
+=== Documentation
+
+The spring-cloud-build module has a "docs" profile, and if you switch
+that on it will try to build asciidoc sources from
+`src/main/asciidoc`. As part of that process it will look for a
+`README.adoc` and process it by loading all the includes, but not
+parsing or rendering it, just copying it to `${main.basedir}`
+(defaults to `${basedir}`, i.e. the root of the project). If there are
+any changes in the README it will then show up after a Maven build as
+a modified file in the correct place. Just commit it and push the change.
+
+=== Working with the code
+If you don't have an IDE preference we would recommend that you use
+http://www.springsource.com/developer/sts[Spring Tools Suite] or
+http://eclipse.org[Eclipse] when working with the code. We use the
+http://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
+should also work without issue as long as they use Maven 3.3.3 or better.
+
+==== Importing into eclipse with m2eclipse
+We recommend the http://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
+eclipse. If you don't already have m2eclipse installed it is available from the "eclipse
+marketplace".
+
+NOTE: Older versions of m2e do not support Maven 3.3, so once the
+projects are imported into Eclipse you will also need to tell
+m2eclipse to use the right profile for the projects. If you
+see many different errors related to the POMs in the projects, check
+that you have an up to date installation. If you can't upgrade m2e,
+add the "spring" profile to your `settings.xml`. Alternatively you can
+copy the repository settings from the "spring" profile of the parent
+pom into your `settings.xml`.
+
+==== Importing into eclipse without m2eclipse
+If you prefer not to use m2eclipse you can generate eclipse project metadata using the
+following command:
+
+[indent=0]
+----
+ $ ./mvnw eclipse:eclipse
+----
+
+The generated eclipse projects can be imported by selecting `import existing projects`
+from the `file` menu.
+
+
+== Contributing
+
+Spring Cloud is released under the non-restrictive Apache 2.0 license,
+and follows a very standard Github development process, using Github
+tracker for issues and merging pull requests into master. If you want
+to contribute even something trivial please do not hesitate, but
+follow the guidelines below.
+
+=== Sign the Contributor License Agreement
+Before we accept a non-trivial patch or pull request we will need you to sign the
+https://cla.pivotal.io/sign/spring[Contributor License Agreement].
+Signing the contributor's agreement does not grant anyone commit rights to the main
+repository, but it does mean that we can accept your contributions, and you will get an
+author credit if we do. Active contributors might be asked to join the core team, and
+given the ability to merge pull requests.
+
+=== Code of Conduct
+This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of
+conduct]. By participating, you are expected to uphold this code. Please report
+unacceptable behavior to spring-code-of-conduct@pivotal.io.
+
+=== Code Conventions and Housekeeping
+None of these is essential for a pull request, but they will all help. They can also be
+added after the original pull request but before a merge.
+
+* Use the Spring Framework code format conventions. If you use Eclipse
+ you can import formatter settings using the
+ `eclipse-code-formatter.xml` file from the
+ https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
+ Cloud Build] project. If using IntelliJ, you can use the
+ http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
+ Plugin] to import the same file.
+* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
+ `@author` tag identifying you, and preferably at least a paragraph on what the class is
+ for.
+* Add the ASF license header comment to all new `.java` files (copy from existing files
+ in the project)
+* Add yourself as an `@author` to the .java files that you modify substantially (more
+ than cosmetic changes).
+* Add some Javadocs and, if you change the namespace, some XSD doc elements.
+* A few unit tests would help a lot as well -- someone has to do it.
+* If no-one else is using your branch, please rebase it against the current master (or
+ other target branch in the main project).
+* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
+ if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
+ message (where XXXX is the issue number).
\ No newline at end of file
diff --git a/docs/pom.xml b/docs/pom.xml
index 71e4757a..7dad9b40 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RC2pomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 7849682d..704e2c60 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RC2pomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index b0e08f98..3527ccd4 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.RELEASEspring-cloud-commons-dependencies
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RC2pomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 5b2ef897..ce38111f 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RC2..spring-cloud-commons
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index 2a941258..109aa8b1 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RC2..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index d6afb487..abedb70e 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RC2..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index b84653b5..8cd49619 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RC2spring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index 0bfc76dc..6f1e1e07 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RC2..spring-cloud-test-support
From 98498958678c347872b1347fe16cadbeee290eb4 Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Thu, 24 May 2018 19:00:21 +0000
Subject: [PATCH 07/41] Going back to snapshots
---
docs/README.adoc | 159 ------------------
docs/pom.xml | 2 +-
pom.xml | 4 +-
spring-cloud-commons-dependencies/pom.xml | 4 +-
spring-cloud-commons/pom.xml | 2 +-
.../pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
9 files changed, 10 insertions(+), 169 deletions(-)
delete mode 100644 docs/README.adoc
diff --git a/docs/README.adoc b/docs/README.adoc
deleted file mode 100644
index 1aa7dfc3..00000000
--- a/docs/README.adoc
+++ /dev/null
@@ -1,159 +0,0 @@
-// Do not edit this file (e.g. go instead to src/main/asciidoc)
-
-image::https://circleci.com/gh/spring-cloud/spring-cloud-commons.svg?style=svg[Build Status, link=https://circleci.com/gh/spring-cloud/spring-cloud-commons]
-
-
-http://pivotal.io/platform-as-a-service/migrating-to-cloud-native-application-architectures-ebook[Cloud Native] is a style of application development that encourages easy adoption of best practices in the areas of continuous delivery and value-driven development.
-A related discipline is that of building http://12factor.net/[12-factor Applications], in which development practices are aligned with delivery and operations goals -- for instance, by using declarative programming and management and monitoring.
-Spring Cloud facilitates these styles of development in a number of specific ways.
- The starting point is a set of features to which all components in a distributed system need easy access.
-
-Many of those features are covered by http://projects.spring.io/spring-boot[Spring Boot], on which Spring Cloud builds. Some more features are delivered by Spring Cloud as two libraries: Spring Cloud Context and Spring Cloud Commons.
-Spring Cloud Context provides utilities and special services for the `ApplicationContext` of a Spring Cloud application (bootstrap context, encryption, refresh scope, and environment endpoints). Spring Cloud Commons is a set of abstractions and common classes used in different Spring Cloud implementations (such as Spring Cloud Netflix and Spring Cloud Consul).
-
-If you get an exception due to "Illegal key size" and you use Sun's JDK, you need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.
-See the following links for more information:
-
-* http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html[Java 6 JCE]
-* http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html[Java 7 JCE]
-* http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html[Java 8 JCE]
-
-Extract the files into the JDK/jre/lib/security folder for whichever version of JRE/JDK x64/x86 you use.
-
-== Building
-
-:jdkversion: 1.7
-
-=== Basic Compile and Test
-
-To build the source you will need to install JDK {jdkversion}.
-
-Spring Cloud uses Maven for most build-related activities, and you
-should be able to get off the ground quite quickly by cloning the
-project you are interested in and typing
-
-----
-$ ./mvnw install
-----
-
-NOTE: You can also install Maven (>=3.3.3) yourself and run the `mvn` command
-in place of `./mvnw` in the examples below. If you do that you also
-might need to add `-P spring` if your local Maven settings do not
-contain repository declarations for spring pre-release artifacts.
-
-NOTE: Be aware that you might need to increase the amount of memory
-available to Maven by setting a `MAVEN_OPTS` environment variable with
-a value like `-Xmx512m -XX:MaxPermSize=128m`. We try to cover this in
-the `.mvn` configuration, so if you find you have to do it to make a
-build succeed, please raise a ticket to get the settings added to
-source control.
-
-For hints on how to build the project look in `.travis.yml` if there
-is one. There should be a "script" and maybe "install" command. Also
-look at the "services" section to see if any services need to be
-running locally (e.g. mongo or rabbit). Ignore the git-related bits
-that you might find in "before_install" since they're related to setting git
-credentials and you already have those.
-
-The projects that require middleware generally include a
-`docker-compose.yml`, so consider using
-http://compose.docker.io/[Docker Compose] to run the middeware servers
-in Docker containers. See the README in the
-https://github.com/spring-cloud-samples/scripts[scripts demo
-repository] for specific instructions about the common cases of mongo,
-rabbit and redis.
-
-NOTE: If all else fails, build with the command from `.travis.yml` (usually
-`./mvnw install`).
-
-=== Documentation
-
-The spring-cloud-build module has a "docs" profile, and if you switch
-that on it will try to build asciidoc sources from
-`src/main/asciidoc`. As part of that process it will look for a
-`README.adoc` and process it by loading all the includes, but not
-parsing or rendering it, just copying it to `${main.basedir}`
-(defaults to `${basedir}`, i.e. the root of the project). If there are
-any changes in the README it will then show up after a Maven build as
-a modified file in the correct place. Just commit it and push the change.
-
-=== Working with the code
-If you don't have an IDE preference we would recommend that you use
-http://www.springsource.com/developer/sts[Spring Tools Suite] or
-http://eclipse.org[Eclipse] when working with the code. We use the
-http://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
-should also work without issue as long as they use Maven 3.3.3 or better.
-
-==== Importing into eclipse with m2eclipse
-We recommend the http://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
-eclipse. If you don't already have m2eclipse installed it is available from the "eclipse
-marketplace".
-
-NOTE: Older versions of m2e do not support Maven 3.3, so once the
-projects are imported into Eclipse you will also need to tell
-m2eclipse to use the right profile for the projects. If you
-see many different errors related to the POMs in the projects, check
-that you have an up to date installation. If you can't upgrade m2e,
-add the "spring" profile to your `settings.xml`. Alternatively you can
-copy the repository settings from the "spring" profile of the parent
-pom into your `settings.xml`.
-
-==== Importing into eclipse without m2eclipse
-If you prefer not to use m2eclipse you can generate eclipse project metadata using the
-following command:
-
-[indent=0]
-----
- $ ./mvnw eclipse:eclipse
-----
-
-The generated eclipse projects can be imported by selecting `import existing projects`
-from the `file` menu.
-
-
-== Contributing
-
-Spring Cloud is released under the non-restrictive Apache 2.0 license,
-and follows a very standard Github development process, using Github
-tracker for issues and merging pull requests into master. If you want
-to contribute even something trivial please do not hesitate, but
-follow the guidelines below.
-
-=== Sign the Contributor License Agreement
-Before we accept a non-trivial patch or pull request we will need you to sign the
-https://cla.pivotal.io/sign/spring[Contributor License Agreement].
-Signing the contributor's agreement does not grant anyone commit rights to the main
-repository, but it does mean that we can accept your contributions, and you will get an
-author credit if we do. Active contributors might be asked to join the core team, and
-given the ability to merge pull requests.
-
-=== Code of Conduct
-This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of
-conduct]. By participating, you are expected to uphold this code. Please report
-unacceptable behavior to spring-code-of-conduct@pivotal.io.
-
-=== Code Conventions and Housekeeping
-None of these is essential for a pull request, but they will all help. They can also be
-added after the original pull request but before a merge.
-
-* Use the Spring Framework code format conventions. If you use Eclipse
- you can import formatter settings using the
- `eclipse-code-formatter.xml` file from the
- https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
- Cloud Build] project. If using IntelliJ, you can use the
- http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
- Plugin] to import the same file.
-* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
- `@author` tag identifying you, and preferably at least a paragraph on what the class is
- for.
-* Add the ASF license header comment to all new `.java` files (copy from existing files
- in the project)
-* Add yourself as an `@author` to the .java files that you modify substantially (more
- than cosmetic changes).
-* Add some Javadocs and, if you change the namespace, some XSD doc elements.
-* A few unit tests would help a lot as well -- someone has to do it.
-* If no-one else is using your branch, please rebase it against the current master (or
- other target branch in the main project).
-* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
- if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
- message (where XXXX is the issue number).
\ No newline at end of file
diff --git a/docs/pom.xml b/docs/pom.xml
index 7dad9b40..71e4757a 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RC2
+ 2.0.0.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 704e2c60..7849682d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RC2
+ 2.0.0.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOT
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 3527ccd4..b0e08f98 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.1.RELEASE
+ 2.0.0.BUILD-SNAPSHOTspring-cloud-commons-dependencies
- 2.0.0.RC2
+ 2.0.0.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index ce38111f..5b2ef897 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RC2
+ 2.0.0.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index 109aa8b1..2a941258 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RC2
+ 2.0.0.BUILD-SNAPSHOT..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index abedb70e..d6afb487 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RC2
+ 2.0.0.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 8cd49619..b84653b5 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RC2
+ 2.0.0.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index 6f1e1e07..0bfc76dc 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RC2
+ 2.0.0.BUILD-SNAPSHOT..spring-cloud-test-support
From c65f306f4ebef10cbc28d5b2f8d2257258426dd6 Mon Sep 17 00:00:00 2001
From: Marcin Grzejszczak
Date: Fri, 25 May 2018 15:16:07 +0200
Subject: [PATCH 08/41] Fixed the missing main.basedir
---
README.adoc | 13 ++++++---
docs/pom.xml | 81 +++++++++++++++++++++++++++-------------------------
2 files changed, 51 insertions(+), 43 deletions(-)
diff --git a/README.adoc b/README.adoc
index f9b4983f..1aa7dfc3 100644
--- a/README.adoc
+++ b/README.adoc
@@ -3,17 +3,22 @@
image::https://circleci.com/gh/spring-cloud/spring-cloud-commons.svg?style=svg[Build Status, link=https://circleci.com/gh/spring-cloud/spring-cloud-commons]
-http://pivotal.io/platform-as-a-service/migrating-to-cloud-native-application-architectures-ebook[Cloud Native] is a style of application development that encourages easy adoption of best practices in the areas of continuous delivery and value-driven development. A related discipline is that of building http://12factor.net/[12-factor Apps] in which development practices are aligned with delivery and operations goals, for instance by using declarative programming and management and monitoring. Spring Cloud facilitates these styles of development in a number of specific ways and the starting point is a set of features that all components in a distributed system either need or need easy access to when required.
+http://pivotal.io/platform-as-a-service/migrating-to-cloud-native-application-architectures-ebook[Cloud Native] is a style of application development that encourages easy adoption of best practices in the areas of continuous delivery and value-driven development.
+A related discipline is that of building http://12factor.net/[12-factor Applications], in which development practices are aligned with delivery and operations goals -- for instance, by using declarative programming and management and monitoring.
+Spring Cloud facilitates these styles of development in a number of specific ways.
+ The starting point is a set of features to which all components in a distributed system need easy access.
-Many of those features are covered by http://projects.spring.io/spring-boot[Spring Boot], which we build on in Spring Cloud. Some more are delivered by Spring Cloud as two libraries: Spring Cloud Context and Spring Cloud Commons. Spring Cloud Context provides utilities and special services for the `ApplicationContext` of a Spring Cloud application (bootstrap context, encryption, refresh scope and environment endpoints). Spring Cloud Commons is a set of abstractions and common classes used in different Spring Cloud implementations (eg. Spring Cloud Netflix vs. Spring Cloud Consul).
+Many of those features are covered by http://projects.spring.io/spring-boot[Spring Boot], on which Spring Cloud builds. Some more features are delivered by Spring Cloud as two libraries: Spring Cloud Context and Spring Cloud Commons.
+Spring Cloud Context provides utilities and special services for the `ApplicationContext` of a Spring Cloud application (bootstrap context, encryption, refresh scope, and environment endpoints). Spring Cloud Commons is a set of abstractions and common classes used in different Spring Cloud implementations (such as Spring Cloud Netflix and Spring Cloud Consul).
-If you are getting an exception due to "Illegal key size" and you are using Sun's JDK, you need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. See the following links for more information:
+If you get an exception due to "Illegal key size" and you use Sun's JDK, you need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.
+See the following links for more information:
* http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html[Java 6 JCE]
* http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html[Java 7 JCE]
* http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html[Java 8 JCE]
-Extract files into JDK/jre/lib/security folder (whichever version of JRE/JDK x64/x86 you are using).
+Extract the files into the JDK/jre/lib/security folder for whichever version of JRE/JDK x64/x86 you use.
== Building
diff --git a/docs/pom.xml b/docs/pom.xml
index 71e4757a..cce0f104 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -1,5 +1,7 @@
-
+4.0.0org.springframework.cloudspring-cloud-commons-docs
@@ -12,50 +14,51 @@
Spring Cloud Commons DocsSpring Cloud Commons Docs
- spring-cloud-commons
+ spring-cloud-commons
+ ${basedir}/..1.1.x,1.2.x,1.3.x
-
+
-
-
- maven-deploy-plugin
-
- true
-
-
+
+
+ maven-deploy-plugin
+
+ true
+
+
-
+ docs
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
- org.asciidoctor
- asciidoctor-maven-plugin
- false
-
-
- com.agilejava.docbkx
- docbkx-maven-plugin
-
-
- org.apache.maven.plugins
- maven-antrun-plugin
- false
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- false
-
-
-
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ org.asciidoctor
+ asciidoctor-maven-plugin
+ false
+
+
+ com.agilejava.docbkx
+ docbkx-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ false
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ false
+
+
+
-
+
From a8e90681b774403b04bc39418ce62d73dcd6b07c Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Thu, 31 May 2018 12:57:36 -0400
Subject: [PATCH 09/41] Renames environmentWebEndpointExtension to
environmentEndpointWebExtension.
This matches boot, even though the boot bean shouldn't be created because of a @ConditionalOnMissingBean
see gh-374
---
...eEnvironmentEndpointAutoConfiguration.java | 2 +-
.../LifecycleMvcAutoConfigurationTests.java | 2 +-
.../EnvironmentManagerIntegrationTests.java | 23 ++++++++++++++++++-
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/WritableEnvironmentEndpointAutoConfiguration.java b/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/WritableEnvironmentEndpointAutoConfiguration.java
index f3c7a5d2..dedfb4e2 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/WritableEnvironmentEndpointAutoConfiguration.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/WritableEnvironmentEndpointAutoConfiguration.java
@@ -54,7 +54,7 @@ public class WritableEnvironmentEndpointAutoConfiguration {
@Bean
@ConditionalOnEnabledEndpoint
- public WritableEnvironmentEndpointWebExtension environmentWebEndpointExtension(
+ public WritableEnvironmentEndpointWebExtension environmentEndpointWebExtension(
WritableEnvironmentEndpoint endpoint, EnvironmentManager environment) {
return new WritableEnvironmentEndpointWebExtension(endpoint, environment);
}
diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/autoconfigure/LifecycleMvcAutoConfigurationTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/autoconfigure/LifecycleMvcAutoConfigurationTests.java
index 67d5ea64..440c31ff 100644
--- a/spring-cloud-context/src/test/java/org/springframework/cloud/autoconfigure/LifecycleMvcAutoConfigurationTests.java
+++ b/spring-cloud-context/src/test/java/org/springframework/cloud/autoconfigure/LifecycleMvcAutoConfigurationTests.java
@@ -38,7 +38,7 @@ public class LifecycleMvcAutoConfigurationTests {
@Test
public void environmentWebEndpointExtensionEnabled() {
- beanCreated("environmentWebEndpointExtension",
+ beanCreated("environmentEndpointWebExtension",
"management.endpoint.env.enabled=true");
}
diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/context/environment/EnvironmentManagerIntegrationTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/context/environment/EnvironmentManagerIntegrationTests.java
index d1e08287..497e924f 100644
--- a/spring-cloud-context/src/test/java/org/springframework/cloud/context/environment/EnvironmentManagerIntegrationTests.java
+++ b/spring-cloud-context/src/test/java/org/springframework/cloud/context/environment/EnvironmentManagerIntegrationTests.java
@@ -24,23 +24,26 @@ import javax.servlet.ServletException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
+import org.springframework.boot.actuate.env.EnvironmentEndpoint;
+import org.springframework.boot.actuate.env.EnvironmentEndpointWebExtension;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.context.environment.EnvironmentManagerIntegrationTests.TestConfiguration;
+import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
@@ -64,6 +67,9 @@ public class EnvironmentManagerIntegrationTests {
@Autowired
private MockMvc mvc;
+ @Autowired
+ private ApplicationContext context;
+
@Test
public void testRefresh() throws Exception {
assertEquals("Hello scope!", properties.getMessage());
@@ -108,6 +114,21 @@ public class EnvironmentManagerIntegrationTests {
.andExpect(status().isNotFound());
}
+ @Test
+ public void environmentBeansConfiguredCorrectly() {
+ Map envbeans = this.context.getBeansOfType(EnvironmentEndpoint.class);
+ assertThat(envbeans).hasSize(1)
+ .containsKey("environmentEndpoint");
+ assertThat(envbeans.get("environmentEndpoint"))
+ .isInstanceOf(WritableEnvironmentEndpoint.class);
+
+ Map extbeans = this.context.getBeansOfType(EnvironmentEndpointWebExtension.class);
+ assertThat(extbeans).hasSize(1)
+ .containsKey("environmentEndpointWebExtension");
+ assertThat(extbeans.get("environmentEndpointWebExtension"))
+ .isInstanceOf(WritableEnvironmentEndpointWebExtension.class);
+ }
+
@Configuration
@EnableAutoConfiguration
protected static class TestConfiguration {
From 88d34390350d55c79e4c6437092a0224acf7381e Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Mon, 4 Jun 2018 14:11:16 -0400
Subject: [PATCH 10/41] Clarify ServiceRegistry documentation. Fixes #361.
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index 4cc98344..54546351 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -349,6 +349,14 @@ public class MyConfiguration {
Each `ServiceRegistry` implementation has its own `Registry` implementation.
+* `ZookeeperRegistration` used with `ZookeeperServiceRegistry`
+* `EurekaRegistration` used with `EurekaServiceRegistry`
+* `ConsulRegistration` used with `ConsulServiceRegistry`
+
+If you are using the `ServiceRegistry` interface, you are going to need to pass the
+correct `Registry` implementation for the `ServiceRegistry` implementation you
+are using.
+
==== ServiceRegistry Auto-Registration
From cb93e9b65887d48498e24a0225c0a05cb5d13b1d Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Tue, 5 Jun 2018 07:31:06 -0400
Subject: [PATCH 11/41] Clarifying /restart /pause and /resume functionality in
docs. Fixes #275.
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index 54546351..d57d2a9a 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -306,6 +306,9 @@ For a Spring Boot Actuator application there are some additional management endp
* `/restart` for closing the `ApplicationContext` and restarting it (disabled by default)
* `/pause` and `/resume` for calling the `Lifecycle` methods (`stop()` and `start()` on the `ApplicationContext`)
+NOTE: If you disable the `/restart` endpoint then the `/pause` and `/resume` endpoints
+will also be disabled since they are just a special case of `/restart`.
+
== Spring Cloud Commons: Common Abstractions
Patterns such as service discovery, load balancing and circuit breakers lend themselves to a common abstraction layer that can be consumed by all Spring Cloud clients, independent of the implementation (e.g. discovery via Eureka or Consul).
From ffae2433e0ef7369deb6ff6b644a01d2c4329b74 Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Tue, 5 Jun 2018 07:38:36 -0400
Subject: [PATCH 12/41] Clarify the meaning of bootstrap properties in
documentation. Fixes #206
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index d57d2a9a..fc316ef7 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -28,7 +28,8 @@ the box it is responsible for loading configuration properties from
the external sources, and also decrypting properties in the local
external configuration files. The two contexts share an `Environment`
which is the source of external properties for any Spring
-application. Bootstrap properties are added with high precedence, so
+application. Bootstrap properties (not `bootstrap.properties` but properties
+ that are loaded during the bootstrap phase) are added with high precedence, so
they cannot be overridden by local configuration, by default.
The bootstrap context uses a different convention for locating
From dc39331ea1b703db70373ec2de6d7456b6b55f7f Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Tue, 5 Jun 2018 10:08:11 -0400
Subject: [PATCH 13/41] Removing HEAD
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 1 -
1 file changed, 1 deletion(-)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index 48dbfa97..c7355258 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -21,7 +21,6 @@ Spring Cloud builds on top of that and adds a few features that probably all com
=== The Bootstrap Application Context
-<<<<<<< HEAD
A Spring Cloud application operates by creating a "`bootstrap`" context, which is a parent context for the main application.
It is responsible for loading configuration properties from the external sources and for decrypting properties in the local external configuration files.
The two contexts share an `Environment`, which is the source of external properties for any Spring application.
From d40b8f3555985a9fae02d7cee409e82bd1e2e3e4 Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Tue, 5 Jun 2018 10:15:40 -0400
Subject: [PATCH 14/41] Clarify how to make immutable beans refreshable. Fixes
#363
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index c7355258..9672eaec 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -167,6 +167,12 @@ This feature addresses the problem of stateful beans that only get their configu
For instance, if a `DataSource` has open connections when the database URL is changed via the `Environment`, you probably want the holders of those connections to be able to complete what they are doing.
Then, the next time something borrows a connection from the pool, it gets one with the new URL.
+Sometimes, it might even be mandatory to apply the `@RefreshScope`
+annotation on some beans which can be only initialized once. If a bean
+is "immutable", you will have to either annotate the bean with `@RefreshScope`
+or specify the classname under the property key
+`spring.cloud.refresh.extra-refreshable`.
+
Refresh scope beans are lazy proxies that initialize when they are used (that is, when a method is called), and the scope acts as a cache of initialized values.
To force a bean to re-initialize on the next method call, you must invalidate its cache entry.
From bda67f235c764f53ce2596607dad35e1a5f9c01f Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Tue, 5 Jun 2018 10:57:33 -0400
Subject: [PATCH 15/41] Clarify property overrides.
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index 9672eaec..d366dc69 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -87,12 +87,12 @@ context you are building), properties in that profile get loaded as well, the sa
=== Overriding the Values of Remote Properties
The property sources that are added to your application by the bootstrap context are often "`remote`" (from example, from Spring Cloud Config Server).
-By default, they cannot be overridden locally, except on the command line.
+By default, they cannot be overridden locally.
If you want to let your applications override the remote properties with their own System properties or config files, the remote property source has to grant it permission by setting `spring.cloud.config.allowOverride=true` (it does not work to set this locally).
Once that flag is set, two finer-grained settings control the location of the remote properties in relation to system properties and the application's local configuration:
* `spring.cloud.config.overrideNone=true`: Override from any local property source.
-* `spring.cloud.config.overrideSystemProperties=false`: Only system properties and environment variables (but not the local config files) should override the remote settings.
+* `spring.cloud.config.overrideSystemProperties=false`: Only system properties, command line arguments, and environment variables (but not the local config files) should override the remote settings.
=== Customizing the Bootstrap Configuration
From 9262c47fb8c1e1c412f44067331d7171867cf69e Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Tue, 5 Jun 2018 15:29:27 -0400
Subject: [PATCH 16/41] Updates to s-c-build 2.0.2.BUILD-SNAPSHOT
---
pom.xml | 2 +-
spring-cloud-commons-dependencies/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7849682d..7f887d8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOT
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index b0e08f98..90c92eac 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,7 +5,7 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOTspring-cloud-commons-dependencies
From 466a2ff20d42604812a908eed2ec28b86d9fc8bf Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Wed, 6 Jun 2018 10:17:32 -0400
Subject: [PATCH 17/41] Clarify location of logging configuration in docs.
Fixes #107.
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index fc316ef7..77edc054 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -216,6 +216,12 @@ org.springframework.cloud.bootstrap.BootstrapConfiguration=sample.custom.CustomP
then the "customProperty" `PropertySource` will show up in any
application that includes that jar on its classpath.
+=== Logging Configuration
+
+If you are going to use Spring Boot to configure log settings than
+you should place this configuration in `bootstrap.[yml | properties]
+if you would like it to apply to all events.
+
=== Environment Changes
The application will listen for an `EnvironmentChangeEvent` and react
From edb2f9ad2dc4027ee99cc7fa00688ef24e830c94 Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Thu, 7 Jun 2018 14:27:30 -0400
Subject: [PATCH 18/41] Add boot autoconfigure processor. Fixes #377
---
spring-cloud-commons/pom.xml | 5 +++++
spring-cloud-context/pom.xml | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index c091e904..95603da1 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -108,6 +108,11 @@
spring-boot-starter-aoptrue
+
+ org.springframework.boot
+ spring-boot-autoconfigure-processor
+ true
+ org.springframework.retryspring-retry
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index b400a1b9..09e625c2 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -48,6 +48,11 @@
spring-integration-jmxtrue
+
+ org.springframework.boot
+ spring-boot-autoconfigure-processor
+ true
+ org.springframework.bootspring-boot-starter-test
From e833dbaa37ab2fed624d7fe6f91553abe8fc1712 Mon Sep 17 00:00:00 2001
From: Matt Benson
Date: Tue, 5 Jun 2018 23:02:55 -0500
Subject: [PATCH 19/41] Fix GenericScope so that multiple subclasses can live
in the same context (non-static inner class cannot resolve parent bean)
---
.../cloud/context/scope/GenericScope.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java b/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java
index d0fa13bc..dfbcbcbb 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java
@@ -256,6 +256,7 @@ public class GenericScope implements Scope, BeanFactoryPostProcessor,
if (getName().equals(root.getDecoratedDefinition().getBeanDefinition()
.getScope())) {
root.setBeanClass(LockedScopedProxyFactoryBean.class);
+ root.getConstructorArgumentValues().addGenericArgumentValue(this);
}
}
}
@@ -311,6 +312,10 @@ public class GenericScope implements Scope, BeanFactoryPostProcessor,
return this.name;
}
+ protected ReadWriteLock getLock(String beanName) {
+ return locks.get(beanName);
+ }
+
private static class BeanLifecycleWrapperCache {
private final ScopeCache cache;
@@ -432,11 +437,16 @@ public class GenericScope implements Scope, BeanFactoryPostProcessor,
}
@SuppressWarnings("serial")
- public class LockedScopedProxyFactoryBean extends ScopedProxyFactoryBean
- implements MethodInterceptor {
+ public static class LockedScopedProxyFactoryBean
+ extends ScopedProxyFactoryBean implements MethodInterceptor {
+ private final S scope;
private String targetBeanName;
+ public LockedScopedProxyFactoryBean(S scope) {
+ this.scope = scope;
+ }
+
@Override
public void setBeanFactory(BeanFactory beanFactory) {
super.setBeanFactory(beanFactory);
@@ -463,7 +473,7 @@ public class GenericScope implements Scope, BeanFactoryPostProcessor,
return invocation.proceed();
}
Object proxy = getObject();
- Lock lock = locks.get(this.targetBeanName).readLock();
+ Lock lock = scope.getLock(this.targetBeanName).readLock();
lock.lock();
try {
if (proxy instanceof Advised) {
From bd138dac44a1529795a1de0fbb90c24d81bec0e9 Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Wed, 13 Jun 2018 16:09:30 -0400
Subject: [PATCH 20/41] fixes formatting
---
.../cloud/context/scope/GenericScope.java | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java b/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java
index b8a60990..8946d353 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/GenericScope.java
@@ -477,14 +477,15 @@ public class GenericScope implements Scope, BeanFactoryPostProcessor,
return invocation.proceed();
}
Object proxy = getObject();
- ReadWriteLock readWriteLock = scope.getLock(this.targetBeanName);
- if (readWriteLock == null) {
- if (logger.isDebugEnabled()) {
- logger.debug("For bean with name [" + this.targetBeanName + "] there is no read write lock. Will create a new one to avoid NPE");
- }
- readWriteLock = new ReentrantReadWriteLock();
- }
- Lock lock = readWriteLock.readLock();
+ ReadWriteLock readWriteLock = scope.getLock(this.targetBeanName);
+ if (readWriteLock == null) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("For bean with name [" + this.targetBeanName
+ + "] there is no read write lock. Will create a new one to avoid NPE");
+ }
+ readWriteLock = new ReentrantReadWriteLock();
+ }
+ Lock lock = readWriteLock.readLock();
lock.lock();
try {
if (proxy instanceof Advised) {
From 16465a36d5146b5c38aeabbc594a7a22e4e6352d Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Fri, 15 Jun 2018 13:55:09 -0400
Subject: [PATCH 21/41] Adds anchor
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index 93534e2e..db605322 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -166,6 +166,7 @@ For instance, a `DataSource` can have its `maxPoolSize` changed at runtime (the
Re-binding `@ConfigurationProperties` does not cover another large class of use cases, where you need more control over the refresh and where you need a change to be atomic over the whole `ApplicationContext`.
To address those concerns, we have `@RefreshScope`.
+[[refresh-scope]]
=== Refresh Scope
When there is a configuration change, a Spring `@Bean` that is marked as `@RefreshScope` gets special treatment.
From 1ade0553ee776d430797124518038f49a9f4f1ed Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Mon, 18 Jun 2018 13:26:29 +0000
Subject: [PATCH 22/41] Update SNAPSHOT to 2.0.0.RELEASE
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context-integration-tests/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index cce0f104..3c85beff 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -8,7 +8,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RELEASEpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 7f887d8f..6874a215 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RELEASEpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.2.BUILD-SNAPSHOT
+ 2.0.2.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 90c92eac..82402a32 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.2.BUILD-SNAPSHOT
+ 2.0.2.RELEASEspring-cloud-commons-dependencies
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RELEASEpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 747849bd..60eb9a8e 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RELEASE..spring-cloud-commons
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index 2a941258..4df7f080 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RELEASE..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 769ad552..258b0c6c 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RELEASE..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index b84653b5..4ae56fdd 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RELEASEspring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index 0bfc76dc..f790a9fe 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.RELEASE..spring-cloud-test-support
From 917c1343500fe86168582d66d0a54e990051e45c Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Mon, 18 Jun 2018 13:29:49 +0000
Subject: [PATCH 23/41] Going back to snapshots
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context-integration-tests/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 3c85beff..cce0f104 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -8,7 +8,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RELEASE
+ 2.0.0.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 6874a215..7f887d8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RELEASE
+ 2.0.0.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.2.RELEASE
+ 2.0.2.BUILD-SNAPSHOT
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 82402a32..90c92eac 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.2.RELEASE
+ 2.0.2.BUILD-SNAPSHOTspring-cloud-commons-dependencies
- 2.0.0.RELEASE
+ 2.0.0.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 60eb9a8e..747849bd 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RELEASE
+ 2.0.0.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index 4df7f080..2a941258 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RELEASE
+ 2.0.0.BUILD-SNAPSHOT..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 258b0c6c..769ad552 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RELEASE
+ 2.0.0.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 4ae56fdd..b84653b5 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RELEASE
+ 2.0.0.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index f790a9fe..0bfc76dc 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.RELEASE
+ 2.0.0.BUILD-SNAPSHOT..spring-cloud-test-support
From a707941e5c427f4d8e58b3bda3a655d079008bcd Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Mon, 18 Jun 2018 13:29:50 +0000
Subject: [PATCH 24/41] Bumping versions to 2.0.1.BUILD-SNAPSHOT after release
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 2 +-
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context-integration-tests/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index cce0f104..9cda6d91 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -8,7 +8,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 7f887d8f..2cabbd6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.2.BUILD-SNAPSHOT
+ 2.0.2.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 90c92eac..1f1a4865 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -9,7 +9,7 @@
spring-cloud-commons-dependencies
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 747849bd..3929a2f3 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index 2a941258..9b76012b 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.BUILD-SNAPSHOT..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 769ad552..0eb88a17 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index b84653b5..807a4c1b 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index 0bfc76dc..f19b81ca 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.1.BUILD-SNAPSHOT..spring-cloud-test-support
From b9c04fb14bd3a7a1901a53d1453893074cf4a72b Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Thu, 28 Jun 2018 14:19:20 +0000
Subject: [PATCH 25/41] Update SNAPSHOT to 1.3.4.RELEASE
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 86e8723a..3379a6e6 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.4.RELEASEpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 7d2886dc..802e2358 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.4.RELEASEpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 1.3.8.RELEASE
+ 1.3.10.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index cd89d5f5..29640c3c 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 1.3.8.BUILD-SNAPSHOT
+ 1.3.10.RELEASEspring-cloud-commons-dependencies
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.4.RELEASEpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 95603da1..87351742 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.4.RELEASE..spring-cloud-commons
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 09e625c2..4ec04b24 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.4.RELEASE..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 8f635929..3389f488 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.4.RELEASEspring-cloud-starterspring-cloud-starter
From 9896cb7062e29ce414c4c52ef78b2a3d5cdaa43b Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Thu, 28 Jun 2018 14:20:21 +0000
Subject: [PATCH 26/41] Going back to snapshots
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 3379a6e6..86e8723a 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.RELEASE
+ 1.3.4.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 802e2358..7d2886dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.RELEASE
+ 1.3.4.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 1.3.10.RELEASE
+ 1.3.8.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 29640c3c..cd89d5f5 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 1.3.10.RELEASE
+ 1.3.8.BUILD-SNAPSHOTspring-cloud-commons-dependencies
- 1.3.4.RELEASE
+ 1.3.4.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 87351742..95603da1 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.RELEASE
+ 1.3.4.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 4ec04b24..09e625c2 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.RELEASE
+ 1.3.4.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 3389f488..8f635929 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.RELEASE
+ 1.3.4.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
From d711556fe8c60cf67b11ba931160c1de973aaf5f Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Thu, 28 Jun 2018 14:20:22 +0000
Subject: [PATCH 27/41] Bumping versions to 1.3.5.BUILD-SNAPSHOT after release
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 86e8723a..2bc6addd 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.5.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 7d2886dc..1f6ae661 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.5.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 1.3.8.RELEASE
+ 1.3.10.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index cd89d5f5..1ca4c6eb 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 1.3.8.BUILD-SNAPSHOT
+ 1.3.10.RELEASEspring-cloud-commons-dependencies
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.5.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 95603da1..55a9a9b0 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.5.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 09e625c2..1fb13099 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.5.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 8f635929..6b76c1a3 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 1.3.4.BUILD-SNAPSHOT
+ 1.3.5.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
From e28f75b01052c11c5c9f2c5a91d3dd6648072629 Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Mon, 2 Jul 2018 14:03:16 -0400
Subject: [PATCH 28/41] Merge changes from boots ModifiedClassPathRunner
---
.../cloud/test/ModifiedClassPathRunner.java | 48 +++++++++++++++----
1 file changed, 38 insertions(+), 10 deletions(-)
diff --git a/spring-cloud-test-support/src/main/java/org/springframework/cloud/test/ModifiedClassPathRunner.java b/spring-cloud-test-support/src/main/java/org/springframework/cloud/test/ModifiedClassPathRunner.java
index a17ff56f..b284eefc 100644
--- a/spring-cloud-test-support/src/main/java/org/springframework/cloud/test/ModifiedClassPathRunner.java
+++ b/spring-cloud-test-support/src/main/java/org/springframework/cloud/test/ModifiedClassPathRunner.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@ import java.util.Collections;
import java.util.List;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
+import java.util.regex.Pattern;
import java.util.stream.Stream;
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
@@ -66,6 +67,9 @@ import org.springframework.util.StringUtils;
*/
public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
+ private static final Pattern INTELLIJ_CLASSPATH_JAR_PATTERN = Pattern
+ .compile(".*classpath(\\d+)?\\.jar");
+
public ModifiedClassPathRunner(Class> testClass) throws InitializationError {
super(testClass);
}
@@ -98,14 +102,14 @@ public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
private URL[] extractUrls(ClassLoader classLoader) throws Exception {
List extractedUrls = new ArrayList<>();
doExtractUrls(classLoader).forEach((URL url) -> {
- if (isSurefireBooterJar(url)) {
+ if (isManifestOnlyJar(url)) {
extractedUrls.addAll(extractUrlsFromManifestClassPath(url));
}
else {
extractedUrls.add(url);
}
});
- return extractedUrls.toArray(new URL[extractedUrls.size()]);
+ return extractedUrls.toArray(new URL[0]);
}
private Stream doExtractUrls(ClassLoader classLoader) throws Exception {
@@ -125,10 +129,29 @@ public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
}
}
+ private boolean isManifestOnlyJar(URL url) {
+ return isSurefireBooterJar(url) || isShortenedIntelliJJar(url);
+ }
+
private boolean isSurefireBooterJar(URL url) {
return url.getPath().contains("surefirebooter");
}
+ private boolean isShortenedIntelliJJar(URL url) {
+ String urlPath = url.getPath();
+ boolean isCandidate = INTELLIJ_CLASSPATH_JAR_PATTERN.matcher(urlPath).matches();
+ if (isCandidate) {
+ try {
+ Attributes attributes = getManifestMainAttributesFromUrl(url);
+ String createdBy = attributes.getValue("Created-By");
+ return createdBy != null && createdBy.contains("IntelliJ");
+ }
+ catch (Exception ex) {
+ }
+ }
+ return false;
+ }
+
private List extractUrlsFromManifestClassPath(URL booterJar) {
List urls = new ArrayList<>();
try {
@@ -143,9 +166,14 @@ public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
}
private String[] getClassPath(URL booterJar) throws Exception {
- try (JarFile jarFile = new JarFile(new File(booterJar.toURI()))) {
- return StringUtils.delimitedListToStringArray(jarFile.getManifest()
- .getMainAttributes().getValue(Attributes.Name.CLASS_PATH), " ");
+ Attributes attributes = getManifestMainAttributesFromUrl(booterJar);
+ return StringUtils.delimitedListToStringArray(
+ attributes.getValue(Attributes.Name.CLASS_PATH), " ");
+ }
+
+ private Attributes getManifestMainAttributesFromUrl(URL url) throws Exception {
+ try (JarFile jarFile = new JarFile(new File(url.toURI()))) {
+ return jarFile.getManifest().getMainAttributes();
}
}
@@ -158,7 +186,7 @@ public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
processedUrls.add(url);
}
}
- return processedUrls.toArray(new URL[processedUrls.size()]);
+ return processedUrls.toArray(new URL[0]);
}
private List getAdditionalUrls(Class> testClass) throws Exception {
@@ -185,7 +213,7 @@ public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
repositorySystem.newLocalRepositoryManager(session, localRepository));
CollectRequest collectRequest = new CollectRequest(null,
Arrays.asList(new RemoteRepository.Builder("central", "default",
- "http://central.maven.org/maven2").build()));
+ "https://repo.maven.apache.org/maven2").build()));
collectRequest.setDependencies(createDependencies(coordinates));
DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, null);
@@ -317,7 +345,7 @@ public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
}
@Override
- public Object invokeExplosively(final Object target, final Object... params)
+ public Object invokeExplosively(Object target, Object... params)
throws Throwable {
return doWithModifiedClassPathThreadContextClassLoader(
() -> ModifiedClassPathFrameworkMethod.super.invokeExplosively(
@@ -351,4 +379,4 @@ public class ModifiedClassPathRunner extends BlockJUnit4ClassRunner {
}
-}
+}
\ No newline at end of file
From 1de9d12150525c75e7f76eb1d0dbe11ebada6237 Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Wed, 11 Jul 2018 16:01:14 -0400
Subject: [PATCH 29/41] Extract target class code into utility class (#391)
* Extract target class code into utility class
---
.../ConfigurationPropertiesRebinder.java | 17 +-------
.../cloud/util/ProxyUtils.java | 39 +++++++++++++++++++
2 files changed, 41 insertions(+), 15 deletions(-)
create mode 100644 spring-cloud-context/src/main/java/org/springframework/cloud/util/ProxyUtils.java
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinder.java b/spring-cloud-context/src/main/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinder.java
index a5350b44..8c8e5c60 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinder.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinder.java
@@ -20,7 +20,6 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.BeansException;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -34,6 +33,7 @@ import org.springframework.jmx.export.annotation.ManagedAttribute;
import org.springframework.jmx.export.annotation.ManagedOperation;
import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.stereotype.Component;
+import org.springframework.cloud.util.ProxyUtils;
/**
* Listens for {@link EnvironmentChangeEvent} and rebinds beans that were bound to the
@@ -94,7 +94,7 @@ public class ConfigurationPropertiesRebinder
try {
Object bean = this.applicationContext.getBean(name);
if (AopUtils.isAopProxy(bean)) {
- bean = getTargetObject(bean);
+ bean = ProxyUtils.getTargetObject(bean);
}
this.applicationContext.getAutowireCapableBeanFactory().destroyBean(bean);
this.applicationContext.getAutowireCapableBeanFactory()
@@ -109,19 +109,6 @@ public class ConfigurationPropertiesRebinder
return false;
}
- @SuppressWarnings("unchecked")
- private static T getTargetObject(Object candidate) {
- try {
- if (AopUtils.isAopProxy(candidate) && (candidate instanceof Advised)) {
- return (T) ((Advised) candidate).getTargetSource().getTarget();
- }
- }
- catch (Exception ex) {
- throw new IllegalStateException("Failed to unwrap proxied object", ex);
- }
- return (T) candidate;
- }
-
@ManagedAttribute
public Set getBeanNames() {
return new HashSet(this.beans.getBeanNames());
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/util/ProxyUtils.java b/spring-cloud-context/src/main/java/org/springframework/cloud/util/ProxyUtils.java
new file mode 100644
index 00000000..57549c43
--- /dev/null
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/util/ProxyUtils.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2013-2018 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.util;
+
+import org.springframework.aop.framework.Advised;
+import org.springframework.aop.support.AopUtils;
+
+/**
+ * @author Ryan Baxter
+ */
+public class ProxyUtils {
+
+ @SuppressWarnings("unchecked")
+ public static T getTargetObject(Object candidate) {
+ try {
+ if (AopUtils.isAopProxy(candidate) && (candidate instanceof Advised)) {
+ return (T) ((Advised) candidate).getTargetSource().getTarget();
+ }
+ }
+ catch (Exception ex) {
+ throw new IllegalStateException("Failed to unwrap proxied object", ex);
+ }
+ return (T) candidate;
+ }
+}
From 84659685d66f0d39514e2de859dc8da64778fff5 Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Thu, 19 Jul 2018 10:28:22 -0400
Subject: [PATCH 30/41] Add note about custom logging prefix
---
docs/src/main/asciidoc/spring-cloud-commons.adoc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc
index db605322..36e576aa 100644
--- a/docs/src/main/asciidoc/spring-cloud-commons.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc
@@ -146,6 +146,9 @@ If you are going to use Spring Boot to configure log settings than
you should place this configuration in `bootstrap.[yml | properties]
if you would like it to apply to all events.
+NOTE: For Spring Cloud to initialize logging configuration properly you cannot use a custom prefix. For example,
+using `custom.loggin.logpath` will not be recognized by Spring Cloud when initializing the logging system.
+
=== Environment Changes
The application listens for an `EnvironmentChangeEvent` and reacts to the change in a couple of standard ways (additional `ApplicationListeners` can be added as `@Beans` by the user in the normal way).
From 57ab7ed469d1bc2dba80d2d157219992674c8a40 Mon Sep 17 00:00:00 2001
From: Ryan Baxter
Date: Thu, 26 Jul 2018 15:09:05 -0400
Subject: [PATCH 31/41] Add null check in RefreshScopeHealthIndicator. Fixes
#397. (#398)
---
.../health/RefreshScopeHealthIndicator.java | 27 ++++++++++---------
.../RefreshScopeHealthIndicatorTests.java | 7 +++++
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java b/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
index a8de8b4f..4e96657a 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
@@ -45,19 +45,20 @@ public class RefreshScopeHealthIndicator extends AbstractHealthIndicator {
@Override
protected void doHealthCheck(Builder builder) throws Exception {
- Map errors = new HashMap<>(this.scope.getIfAvailable().getErrors());
- errors.putAll(this.rebinder.getErrors());
- if (errors.isEmpty()) {
- builder.up();
- }
- else {
- builder.down();
- if (errors.size() == 1) {
- builder.withException(errors.values().iterator().next());
- }
- else {
- for (String name : errors.keySet()) {
- builder.withDetail(name, errors.get(name));
+ RefreshScope refreshScope = this.scope.getIfAvailable();
+ if(refreshScope != null) {
+ Map errors = new HashMap<>(refreshScope.getErrors());
+ errors.putAll(this.rebinder.getErrors());
+ if (errors.isEmpty()) {
+ builder.up();
+ } else {
+ builder.down();
+ if (errors.size() == 1) {
+ builder.withException(errors.values().iterator().next());
+ } else {
+ for (String name : errors.keySet()) {
+ builder.withDetail(name, errors.get(name));
+ }
}
}
}
diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/health/RefreshScopeHealthIndicatorTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/health/RefreshScopeHealthIndicatorTests.java
index 4009b8b9..88adea70 100644
--- a/spring-cloud-context/src/test/java/org/springframework/cloud/health/RefreshScopeHealthIndicatorTests.java
+++ b/spring-cloud-context/src/test/java/org/springframework/cloud/health/RefreshScopeHealthIndicatorTests.java
@@ -81,4 +81,11 @@ public class RefreshScopeHealthIndicatorTests {
assertEquals(Status.DOWN, this.indicator.health().getStatus());
}
+ @Test
+ public void nullRefreshScope() {
+ ObjectProvider scopeProvider = mock(ObjectProvider.class);
+ BDDMockito.willReturn(null).given(scopeProvider).getIfAvailable();
+ assertEquals(Status.UP, this.indicator.health().getStatus());
+ }
+
}
From 1998ac2892a68c1e3e2386bfcf40d43b32c9cab2 Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Tue, 31 Jul 2018 18:03:14 +0000
Subject: [PATCH 32/41] Update SNAPSHOT to 2.0.1.RELEASE
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context-integration-tests/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 9cda6d91..34d1bea8 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -8,7 +8,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASEpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 2cabbd6d..852b6b5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASEpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.2.RELEASE
+ 2.0.3.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 1f1a4865..50d12dae 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.2.BUILD-SNAPSHOT
+ 2.0.3.RELEASEspring-cloud-commons-dependencies
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASEpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 3929a2f3..3466bad3 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASE..spring-cloud-commons
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index 9b76012b..b4f765f3 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASE..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 0eb88a17..287f699c 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASE..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 807a4c1b..283650c6 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASEspring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index f19b81ca..82c95b0c 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.1.RELEASE..spring-cloud-test-support
From 36146312ab87c3038297c5060f578f26566566b9 Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Tue, 31 Jul 2018 18:05:58 +0000
Subject: [PATCH 33/41] Going back to snapshots
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context-integration-tests/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 34d1bea8..9cda6d91 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -8,7 +8,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 852b6b5b..2cabbd6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.3.RELEASE
+ 2.0.2.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 50d12dae..1f1a4865 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.3.RELEASE
+ 2.0.2.BUILD-SNAPSHOTspring-cloud-commons-dependencies
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 3466bad3..3929a2f3 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index b4f765f3..9b76012b 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOT..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 287f699c..0eb88a17 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 283650c6..807a4c1b 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index 82c95b0c..f19b81ca 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.RELEASE
+ 2.0.1.BUILD-SNAPSHOT..spring-cloud-test-support
From 8efcb1577e1ffa010a66d82b6e98fca7a0375f13 Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Tue, 31 Jul 2018 18:05:58 +0000
Subject: [PATCH 34/41] Bumping versions to 2.0.2.BUILD-SNAPSHOT after release
---
docs/pom.xml | 2 +-
pom.xml | 4 ++--
spring-cloud-commons-dependencies/pom.xml | 4 ++--
spring-cloud-commons/pom.xml | 2 +-
spring-cloud-context-integration-tests/pom.xml | 2 +-
spring-cloud-context/pom.xml | 2 +-
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index 9cda6d91..edfba75c 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -8,7 +8,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
diff --git a/pom.xml b/pom.xml
index 2cabbd6d..5e39cc04 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.2.RELEASE
+ 2.0.3.RELEASE
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 1f1a4865..9c9d544c 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.2.BUILD-SNAPSHOT
+ 2.0.3.RELEASEspring-cloud-commons-dependencies
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index 3929a2f3..a4c7a419 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index 9b76012b..58fee792 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOT..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 0eb88a17..3684942b 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index 807a4c1b..c153f105 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index f19b81ca..ddf021d1 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.1.BUILD-SNAPSHOT
+ 2.0.2.BUILD-SNAPSHOT..spring-cloud-test-support
From df2ba5cf2a1550c0c27bad4d6d4e4885ffa5717f Mon Sep 17 00:00:00 2001
From: Dave Syer
Date: Wed, 1 Aug 2018 15:51:14 +0100
Subject: [PATCH 35/41] Update RSA deps to latest release
---
spring-cloud-commons-dependencies/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index 9c9d544c..ea634b9d 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -14,7 +14,7 @@
spring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
- 1.0.5.RELEASE
+ 1.0.7.RELEASE
From 69181c14d1e4cc7018835ddbbf86177328c2c54f Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Wed, 1 Aug 2018 13:20:28 -0400
Subject: [PATCH 36/41] formatting
---
.../cloud/health/RefreshScopeHealthIndicator.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java b/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
index 4e96657a..48257f56 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
@@ -46,16 +46,18 @@ public class RefreshScopeHealthIndicator extends AbstractHealthIndicator {
@Override
protected void doHealthCheck(Builder builder) throws Exception {
RefreshScope refreshScope = this.scope.getIfAvailable();
- if(refreshScope != null) {
+ if (refreshScope != null) {
Map errors = new HashMap<>(refreshScope.getErrors());
errors.putAll(this.rebinder.getErrors());
if (errors.isEmpty()) {
builder.up();
- } else {
+ }
+ else {
builder.down();
if (errors.size() == 1) {
builder.withException(errors.values().iterator().next());
- } else {
+ }
+ else {
for (String name : errors.keySet()) {
builder.withDetail(name, errors.get(name));
}
From 87bb8f1fa17f71f0bc21a7d9f5c972706fe5feb4 Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Wed, 1 Aug 2018 16:19:44 -0400
Subject: [PATCH 37/41] Upgrades to build 2.1.0.BUILD-SNAPSHOT and boot 2.1.x
Moves refresh scope proxy creation from BeanDefinitionRegistryPostProcessor to BeanPostProcessor
fixes gh-400
---
docs/pom.xml | 4 +-
pom.xml | 4 +-
spring-cloud-commons-dependencies/pom.xml | 4 +-
spring-cloud-commons/pom.xml | 2 +-
.../CommonsClientAutoConfigurationTests.java | 3 +-
...EnableDiscoveryClientMissingImplTests.java | 3 +-
...actLoadBalancerAutoConfigurationTests.java | 3 +-
...yncLoadBalancerAutoConfigurationTests.java | 3 +-
...ancerRequestFactoryConfigurationTests.java | 3 +-
...iceRegistrationAutoConfigurationTests.java | 5 +-
.../pom.xml | 2 +-
.../RefreshScopeIntegrationTests.java | 1 +
spring-cloud-context/pom.xml | 2 +-
.../RefreshAutoConfiguration.java | 63 +++++++++++--------
.../RefreshAutoConfigurationTests.java | 2 +-
.../refresh/ContextRefresherTests.java | 10 +--
spring-cloud-starter/pom.xml | 2 +-
spring-cloud-test-support/pom.xml | 2 +-
18 files changed, 67 insertions(+), 51 deletions(-)
diff --git a/docs/pom.xml b/docs/pom.xml
index edfba75c..d1eb9961 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -8,7 +8,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.2.BUILD-SNAPSHOT
+ 2.1.0.BUILD-SNAPSHOTpomSpring Cloud Commons Docs
@@ -16,7 +16,7 @@
spring-cloud-commons${basedir}/..
- 1.1.x,1.2.x,1.3.x
+ 1.2.x,1.3.x,2.0.x
diff --git a/pom.xml b/pom.xml
index 5e39cc04..9dfbf2c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.springframework.cloudspring-cloud-commons-parent
- 2.0.2.BUILD-SNAPSHOT
+ 2.1.0.BUILD-SNAPSHOTpomSpring Cloud Commons ParentSpring Cloud Commons Parent
@@ -11,7 +11,7 @@
org.springframework.cloudspring-cloud-build
- 2.0.3.RELEASE
+ 2.1.0.BUILD-SNAPSHOT
diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml
index ea634b9d..c7e8642c 100644
--- a/spring-cloud-commons-dependencies/pom.xml
+++ b/spring-cloud-commons-dependencies/pom.xml
@@ -5,11 +5,11 @@
spring-cloud-dependencies-parentorg.springframework.cloud
- 2.0.3.RELEASE
+ 2.1.0.BUILD-SNAPSHOTspring-cloud-commons-dependencies
- 2.0.2.BUILD-SNAPSHOT
+ 2.1.0.BUILD-SNAPSHOTpomspring-cloud-commons-dependenciesSpring Cloud Commons Dependencies
diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml
index a4c7a419..2a7cc349 100644
--- a/spring-cloud-commons/pom.xml
+++ b/spring-cloud-commons/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.2.BUILD-SNAPSHOT
+ 2.1.0.BUILD-SNAPSHOT..spring-cloud-commons
diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/CommonsClientAutoConfigurationTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/CommonsClientAutoConfigurationTests.java
index c11877f7..c390a3c2 100644
--- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/CommonsClientAutoConfigurationTests.java
+++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/CommonsClientAutoConfigurationTests.java
@@ -2,6 +2,7 @@ package org.springframework.cloud.client;
import org.junit.Test;
import org.springframework.beans.BeansException;
+import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.actuator.FeaturesEndpoint;
@@ -81,7 +82,7 @@ public class CommonsClientAutoConfigurationTests {
}
protected ConfigurableApplicationContext init(String... pairs) {
- return new SpringApplicationBuilder().web(false).sources(Config.class)
+ return new SpringApplicationBuilder().web(WebApplicationType.NONE).sources(Config.class)
.properties(pairs).run();
}
diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/EnableDiscoveryClientMissingImplTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/EnableDiscoveryClientMissingImplTests.java
index b1a0c461..7bfb1796 100644
--- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/EnableDiscoveryClientMissingImplTests.java
+++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/discovery/EnableDiscoveryClientMissingImplTests.java
@@ -1,6 +1,7 @@
package org.springframework.cloud.client.discovery;
import org.junit.Test;
+import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
@@ -19,7 +20,7 @@ public class EnableDiscoveryClientMissingImplTests {
@Test
public void testContextFails() {
try (ConfigurableApplicationContext context = new SpringApplicationBuilder()
- .sources(App.class).web(false).run(new String[0]);) {
+ .sources(App.class).web(WebApplicationType.NONE).run(new String[0]);) {
}
catch (NestedRuntimeException e) {
Throwable rootCause = e.getRootCause();
diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/AbstractLoadBalancerAutoConfigurationTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/AbstractLoadBalancerAutoConfigurationTests.java
index dad62f0b..8df8ccc8 100644
--- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/AbstractLoadBalancerAutoConfigurationTests.java
+++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/AbstractLoadBalancerAutoConfigurationTests.java
@@ -31,6 +31,7 @@ import java.util.Random;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.DefaultServiceInstance;
import org.springframework.cloud.client.ServiceInstance;
@@ -81,7 +82,7 @@ public abstract class AbstractLoadBalancerAutoConfigurationTests {
}
protected ConfigurableApplicationContext init(Class> config) {
- return new SpringApplicationBuilder().web(false)
+ return new SpringApplicationBuilder().web(WebApplicationType.NONE)
.properties("spring.aop.proxyTargetClass=true")
.sources(config, LoadBalancerAutoConfiguration.class).run();
}
diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/AsyncLoadBalancerAutoConfigurationTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/AsyncLoadBalancerAutoConfigurationTests.java
index 84d0903e..41d4f5f9 100644
--- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/AsyncLoadBalancerAutoConfigurationTests.java
+++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/AsyncLoadBalancerAutoConfigurationTests.java
@@ -19,6 +19,7 @@ package org.springframework.cloud.client.loadbalancer;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.DefaultServiceInstance;
import org.springframework.cloud.client.ServiceInstance;
@@ -89,7 +90,7 @@ public class AsyncLoadBalancerAutoConfigurationTests {
}
protected ConfigurableApplicationContext init(Class> config) {
- return new SpringApplicationBuilder().web(false)
+ return new SpringApplicationBuilder().web(WebApplicationType.NONE)
.properties("spring.aop.proxyTargetClass=true")
.sources(config, AsyncLoadBalancerAutoConfiguration.class).run();
}
diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/LoadBalancerRequestFactoryConfigurationTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/LoadBalancerRequestFactoryConfigurationTests.java
index 4cdbc0a5..c89a3e14 100644
--- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/LoadBalancerRequestFactoryConfigurationTests.java
+++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/loadbalancer/LoadBalancerRequestFactoryConfigurationTests.java
@@ -28,6 +28,7 @@ import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
+import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.context.ConfigurableApplicationContext;
@@ -62,7 +63,7 @@ public class LoadBalancerRequestFactoryConfigurationTests {
}
protected ConfigurableApplicationContext init(Class> config) {
- ConfigurableApplicationContext context = new SpringApplicationBuilder().web(false)
+ ConfigurableApplicationContext context = new SpringApplicationBuilder().web(WebApplicationType.NONE)
.properties("spring.aop.proxyTargetClass=true")
.sources(config, LoadBalancerAutoConfiguration.class).run();
diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/AutoServiceRegistrationAutoConfigurationTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/AutoServiceRegistrationAutoConfigurationTests.java
index 39e82067..a1126619 100644
--- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/AutoServiceRegistrationAutoConfigurationTests.java
+++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/AutoServiceRegistrationAutoConfigurationTests.java
@@ -8,8 +8,9 @@ import org.hamcrest.Matchers;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+
import org.springframework.beans.factory.BeanCreationException;
-import org.springframework.boot.test.util.EnvironmentTestUtils;
+import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -74,7 +75,7 @@ public class AutoServiceRegistrationAutoConfigurationTests {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.register(list.toArray(new Class[0]));
if (StringUtils.hasText(property)) {
- EnvironmentTestUtils.addEnvironment(context, property);
+ TestPropertyValues.of(property).applyTo(context);
}
context.refresh();
return context;
diff --git a/spring-cloud-context-integration-tests/pom.xml b/spring-cloud-context-integration-tests/pom.xml
index 58fee792..30644d60 100644
--- a/spring-cloud-context-integration-tests/pom.xml
+++ b/spring-cloud-context-integration-tests/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.2.BUILD-SNAPSHOT
+ 2.1.0.BUILD-SNAPSHOT..spring-cloud-context-integration-tests
diff --git a/spring-cloud-context-integration-tests/src/test/java/org/springframework/cloud/autoconfigure/RefreshScopeIntegrationTests.java b/spring-cloud-context-integration-tests/src/test/java/org/springframework/cloud/autoconfigure/RefreshScopeIntegrationTests.java
index 7cc93062..47c6b6c6 100644
--- a/spring-cloud-context-integration-tests/src/test/java/org/springframework/cloud/autoconfigure/RefreshScopeIntegrationTests.java
+++ b/spring-cloud-context-integration-tests/src/test/java/org/springframework/cloud/autoconfigure/RefreshScopeIntegrationTests.java
@@ -49,6 +49,7 @@ import static org.junit.Assert.assertTrue;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = TestConfiguration.class)
+@SuppressWarnings("Duplicates")
public class RefreshScopeIntegrationTests {
@Autowired
diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml
index 3684942b..3b52b3bb 100644
--- a/spring-cloud-context/pom.xml
+++ b/spring-cloud-context/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.2.BUILD-SNAPSHOT
+ 2.1.0.BUILD-SNAPSHOT..spring-cloud-context
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java b/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java
index c6e41a6f..78518ef2 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java
@@ -23,13 +23,14 @@ import java.util.Set;
import javax.annotation.PostConstruct;
-import org.springframework.aop.scope.ScopedProxyUtils;
+import org.springframework.aop.framework.ProxyFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.ListableBeanFactory;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.beans.factory.config.BeanDefinitionHolder;
+import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
@@ -62,10 +63,14 @@ import org.springframework.stereotype.Component;
*/
@Configuration
@ConditionalOnClass(RefreshScope.class)
-@ConditionalOnProperty(name = "spring.cloud.refresh.enabled", matchIfMissing = true)
+@ConditionalOnProperty(name = RefreshAutoConfiguration.REFRESH_SCOPE_ENABLED, matchIfMissing = true)
@AutoConfigureBefore(HibernateJpaAutoConfiguration.class)
public class RefreshAutoConfiguration {
+ public static final String REFRESH_SCOPE_NAME = "refresh";
+ public static final String REFRESH_SCOPE_PREFIX = "spring.cloud.refresh";
+ public static final String REFRESH_SCOPE_ENABLED = REFRESH_SCOPE_PREFIX + ".enabled";
+
@Bean
@ConditionalOnMissingBean(RefreshScope.class)
public static RefreshScope refreshScope() {
@@ -95,7 +100,9 @@ public class RefreshAutoConfiguration {
@Component
protected static class RefreshScopeBeanDefinitionEnhancer
- implements BeanDefinitionRegistryPostProcessor {
+ implements BeanPostProcessor, BeanDefinitionRegistryPostProcessor {
+
+ private BeanDefinitionRegistry registry;
/**
* Class names for beans to post process into refresh scope. Useful when you don't
@@ -104,8 +111,6 @@ public class RefreshAutoConfiguration {
private Set refreshables = new HashSet<>(
Arrays.asList("com.zaxxer.hikari.HikariDataSource"));
- private Environment environment;
-
public Set getRefreshable() {
return this.refreshables;
}
@@ -124,29 +129,42 @@ public class RefreshAutoConfiguration {
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
throws BeansException {
+ Environment environment = beanFactory.getBean(Environment.class);
+ if (environment == null) {
+ environment = new StandardEnvironment();
+ }
+ Binder.get(environment).bind(REFRESH_SCOPE_PREFIX, Bindable.ofInstance(this));
}
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry)
throws BeansException {
- for (String name : registry.getBeanDefinitionNames()) {
- BeanDefinition definition = registry.getBeanDefinition(name);
- if (isApplicable(registry, name, definition)) {
- BeanDefinitionHolder holder = new BeanDefinitionHolder(definition,
- name);
- BeanDefinitionHolder proxy = ScopedProxyUtils
- .createScopedProxy(holder, registry, true);
- definition.setScope("refresh");
- registry.registerBeanDefinition(proxy.getBeanName(),
- proxy.getBeanDefinition());
- }
+ this.registry = registry;
+ }
+
+ @Override
+ public Object postProcessAfterInitialization(Object bean, String beanName)
+ throws BeansException {
+ BeanDefinition definition = null;
+ try {
+ definition = registry.getBeanDefinition(beanName);
}
+ catch (NoSuchBeanDefinitionException e) {
+ // just ignore and move on
+ return bean;
+ }
+ if (isApplicable(registry, beanName, definition)) {
+ definition.setScope(REFRESH_SCOPE_NAME);
+ ProxyFactory proxyFactory = new ProxyFactory(bean);
+ return proxyFactory.getProxy();
+ }
+ return bean;
}
private boolean isApplicable(BeanDefinitionRegistry registry, String name,
BeanDefinition definition) {
String scope = definition.getScope();
- if ("refresh".equals(scope)) {
+ if (REFRESH_SCOPE_NAME.equals(scope)) {
// Already refresh scoped
return false;
}
@@ -158,15 +176,6 @@ public class RefreshAutoConfiguration {
}
}
if (type != null) {
- if (this.environment == null && registry instanceof BeanFactory) {
- this.environment = ((BeanFactory) registry)
- .getBean(Environment.class);
- }
- if (this.environment == null) {
- this.environment = new StandardEnvironment();
- }
- Binder.get(environment).bind("spring.cloud.refresh",
- Bindable.ofInstance(this));
return this.refreshables.contains(type);
}
return false;
diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/autoconfigure/RefreshAutoConfigurationTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/autoconfigure/RefreshAutoConfigurationTests.java
index 7512f2ef..2ec3f28d 100644
--- a/spring-cloud-context/src/test/java/org/springframework/cloud/autoconfigure/RefreshAutoConfigurationTests.java
+++ b/spring-cloud-context/src/test/java/org/springframework/cloud/autoconfigure/RefreshAutoConfigurationTests.java
@@ -69,7 +69,7 @@ public class RefreshAutoConfigurationTests {
@Configuration
@EnableAutoConfiguration(exclude = DataSourceAutoConfiguration.class)
- @EnableConfigurationProperties(ConfigProps.class)
+ @EnableConfigurationProperties
static class Config {
}
diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/context/refresh/ContextRefresherTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/context/refresh/ContextRefresherTests.java
index e4b7cc9c..d7591d0f 100644
--- a/spring-cloud-context/src/test/java/org/springframework/cloud/context/refresh/ContextRefresherTests.java
+++ b/spring-cloud-context/src/test/java/org/springframework/cloud/context/refresh/ContextRefresherTests.java
@@ -38,7 +38,7 @@ public class ContextRefresherTests {
@Test
public void orderNewPropertiesConsistentWithNewContext() {
try (ConfigurableApplicationContext context = SpringApplication.run(Empty.class,
- "--spring.main.webEnvironment=false", "--debug=false",
+ "--spring.main.web-application-type=none", "--debug=false",
"--spring.main.bannerMode=OFF")) {
context.getEnvironment().setActiveProfiles("refresh");
List names = names(context.getEnvironment().getPropertySources());
@@ -61,7 +61,7 @@ public class ContextRefresherTests {
// Use spring.cloud.bootstrap.name to switch off the defaults (which would pick up
// a bootstrapProperties immediately
try (ConfigurableApplicationContext context = SpringApplication.run(Empty.class,
- "--spring.main.webEnvironment=false", "--debug=false",
+ "--spring.main.web-application-type=none", "--debug=false",
"--spring.main.bannerMode=OFF",
"--spring.cloud.bootstrap.name=refresh")) {
List names = names(context.getEnvironment().getPropertySources());
@@ -82,7 +82,7 @@ public class ContextRefresherTests {
// Use spring.cloud.bootstrap.name to switch off the defaults (which would pick up
// a bootstrapProperties immediately
try (ConfigurableApplicationContext context = SpringApplication.run(
- ContextRefresherTests.class, "--spring.main.webEnvironment=false",
+ ContextRefresherTests.class, "--spring.main.web-application-type=none",
"--debug=false", "--spring.main.bannerMode=OFF",
"--spring.cloud.bootstrap.name=refresh")) {
ContextRefresher refresher = new ContextRefresher(context, scope);
@@ -107,7 +107,7 @@ public class ContextRefresherTests {
.get(getClass().getClassLoader());
assertThat(system.getCount()).isEqualTo(0);
try (ConfigurableApplicationContext context = SpringApplication.run(Empty.class,
- "--spring.main.webEnvironment=false", "--debug=false",
+ "--spring.main.web-application-type=none", "--debug=false",
"--spring.main.bannerMode=OFF",
"--spring.cloud.bootstrap.name=refresh")) {
assertThat(system.getCount()).isEqualTo(4);
@@ -123,7 +123,7 @@ public class ContextRefresherTests {
TestBootstrapConfiguration.fooSightings = new ArrayList<>();
try (ConfigurableApplicationContext context = SpringApplication.run(ContextRefresherTests.class,
- "--spring.main.webEnvironment=false", "--debug=false",
+ "--spring.main.web-application-type=none", "--debug=false",
"--spring.main.bannerMode=OFF",
"--spring.cloud.bootstrap.name=refresh",
"--test.bootstrap.foo=bar")) {
diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml
index c153f105..f1ef0553 100644
--- a/spring-cloud-starter/pom.xml
+++ b/spring-cloud-starter/pom.xml
@@ -5,7 +5,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.2.BUILD-SNAPSHOT
+ 2.1.0.BUILD-SNAPSHOTspring-cloud-starterspring-cloud-starter
diff --git a/spring-cloud-test-support/pom.xml b/spring-cloud-test-support/pom.xml
index ddf021d1..28826c2f 100644
--- a/spring-cloud-test-support/pom.xml
+++ b/spring-cloud-test-support/pom.xml
@@ -6,7 +6,7 @@
org.springframework.cloudspring-cloud-commons-parent
- 2.0.2.BUILD-SNAPSHOT
+ 2.1.0.BUILD-SNAPSHOT..spring-cloud-test-support
From 55c7833e4cc80b6eeaaaf4c1c1da8308f9ada27f Mon Sep 17 00:00:00 2001
From: Ben Klein
Date: Mon, 6 Aug 2018 12:02:41 -0500
Subject: [PATCH 38/41] Minor Javadoc cleanup (#401)
Nothing major found--mostly just polish.
---
.../cloud/client/DefaultServiceInstance.java | 4 +-
.../cloud/client/ServiceInstance.java | 16 ++++----
.../EnableCircuitBreakerImportSelector.java | 2 +-
.../client/discovery/DiscoveryClient.java | 16 ++++----
.../composite/CompositeDiscoveryClient.java | 4 +-
...ositeDiscoveryClientAutoConfiguration.java | 2 +-
.../discovery/event/HeartbeatEvent.java | 18 ++++-----
.../discovery/event/HeartbeatMonitor.java | 8 ++--
.../event/InstanceRegisteredEvent.java | 6 +--
.../discovery/event/ParentHeartbeatEvent.java | 4 +-
.../DiscoveryCompositeHealthIndicator.java | 4 +-
.../health/DiscoveryHealthIndicator.java | 4 +-
.../discovery/noop/NoopDiscoveryClient.java | 4 +-
.../NoopDiscoveryClientAutoConfiguration.java | 2 +-
.../simple/SimpleDiscoveryClient.java | 2 +-
...impleDiscoveryClientAutoConfiguration.java | 2 +-
.../simple/SimpleDiscoveryProperties.java | 8 ++--
.../CloudHypermediaAutoConfiguration.java | 4 +-
.../client/hypermedia/DiscoveredResource.java | 6 +--
.../DynamicServiceInstanceProvider.java | 2 +-
.../client/hypermedia/RemoteResource.java | 10 ++---
.../hypermedia/RemoteResourceRefresher.java | 2 +-
.../hypermedia/ServiceInstanceProvider.java | 8 ++--
.../hypermedia/TraversalDefinition.java | 2 +-
.../AsyncLoadBalancerAutoConfiguration.java | 2 +-
...ClientHttpResponseStatusCodeException.java | 10 ++---
.../loadbalancer/InterceptorRetryPolicy.java | 8 ++--
.../client/loadbalancer/LoadBalanced.java | 2 +-
.../LoadBalancedRecoveryCallback.java | 12 +++---
.../LoadBalancedRetryContext.java | 20 +++++-----
.../LoadBalancedRetryFactory.java | 16 ++++----
.../loadbalancer/LoadBalancedRetryPolicy.java | 27 ++++++-------
.../LoadBalancerAutoConfiguration.java | 2 +-
.../loadbalancer/LoadBalancerClient.java | 40 +++++++++----------
.../LoadBalancerRequestTransformer.java | 6 +--
.../LoadBalancerRetryProperties.java | 6 +--
.../loadbalancer/ServiceInstanceChooser.java | 6 +--
.../AbstractAutoServiceRegistration.java | 28 ++++++-------
.../AutoServiceRegistrationProperties.java | 6 +--
.../serviceregistry/ServiceRegistry.java | 20 +++++-----
.../endpoint/ServiceRegistryEndpoint.java | 2 +-
...cheHttpClientConnectionManagerFactory.java | 14 +++----
.../httpclient/ApacheHttpClientFactory.java | 2 +-
.../DefaultApacheHttpClientFactory.java | 3 +-
.../OkHttpClientConnectionPoolFactory.java | 10 ++---
.../cloud/commons/util/InetUtils.java | 4 +-
.../commons/util/InetUtilsProperties.java | 11 ++---
.../util/SpringFactoryImportSelector.java | 2 +-
...LifecycleMvcEndpointAutoConfiguration.java | 4 +-
.../bootstrap/BootstrapConfiguration.java | 2 +-
.../PropertySourceBootstrapProperties.java | 2 +-
.../config/PropertySourceLocator.java | 6 +--
...ironmentDecryptApplicationInitializer.java | 4 +-
.../bootstrap/encrypt/KeyProperties.java | 8 ++--
.../bootstrap/encrypt/RsaProperties.java | 14 +++----
.../environment/EnvironmentChangeEvent.java | 2 +-
.../environment/EnvironmentManager.java | 2 +-
...itableEnvironmentEndpointWebExtension.java | 2 +-
.../ConfigurationPropertiesBeans.java | 2 +-
.../ConfigurationPropertiesRebinder.java | 6 +--
.../context/refresh/ContextRefresher.java | 2 +-
.../context/restart/RestartListener.java | 2 +-
.../cloud/context/scope/GenericScope.java | 24 +++++------
.../cloud/context/scope/ScopeCache.java | 24 +++++------
.../context/scope/refresh/RefreshScope.java | 20 +++++-----
.../context/scope/thread/ThreadScope.java | 2 +-
.../cloud/endpoint/event/RefreshEvent.java | 2 +-
.../endpoint/event/RefreshEventListener.java | 2 +-
.../health/RefreshScopeHealthIndicator.java | 2 +-
69 files changed, 267 insertions(+), 266 deletions(-)
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/DefaultServiceInstance.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/DefaultServiceInstance.java
index d7e710c2..d9498482 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/DefaultServiceInstance.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/DefaultServiceInstance.java
@@ -64,9 +64,9 @@ public class DefaultServiceInstance implements ServiceInstance {
}
/**
- * Create a uri from the given ServiceInstance's host:port
+ * Creates a URI from the given ServiceInstance's host:port.
* @param instance
- * @return URI of the form (secure)?https:http + "host:port"
+ * @return URI of the form (secure)?https:http + "host:port".
*/
public static URI getUri(ServiceInstance instance) {
String scheme = (instance.isSecure()) ? "https" : "http";
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/ServiceInstance.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/ServiceInstance.java
index 9fe58c48..d380bc02 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/ServiceInstance.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/ServiceInstance.java
@@ -20,43 +20,43 @@ import java.net.URI;
import java.util.Map;
/**
- * Represents an instance of a Service in a Discovery System
+ * Represents an instance of a service in a discovery system.
* @author Spencer Gibb
*/
public interface ServiceInstance {
/**
- * @return the service id as registered.
+ * @return The service ID as registered.
*/
String getServiceId();
/**
- * @return the hostname of the registered ServiceInstance
+ * @return The hostname of the registered service instance.
*/
String getHost();
/**
- * @return the port of the registered ServiceInstance
+ * @return The port of the registered service instance.
*/
int getPort();
/**
- * @return if the port of the registered ServiceInstance is https or not
+ * @return Whether the port of the registered service instance uses HTTPS.
*/
boolean isSecure();
/**
- * @return the service uri address
+ * @return The service URI address.
*/
URI getUri();
/**
- * @return the key value pair metadata associated with the service instance
+ * @return The key / value pair metadata associated with the service instance.
*/
Map getMetadata();
/**
- * @return the scheme of the instance
+ * @return The scheme of the service instance.
*/
default String getScheme() {
return null;
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/circuitbreaker/EnableCircuitBreakerImportSelector.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/circuitbreaker/EnableCircuitBreakerImportSelector.java
index e56b592b..934ffb74 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/circuitbreaker/EnableCircuitBreakerImportSelector.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/circuitbreaker/EnableCircuitBreakerImportSelector.java
@@ -21,7 +21,7 @@ import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
/**
- * Import a single circuit breaker implementation Configuration
+ * Imports a single circuit breaker implementation configuration.
* @author Spencer Gibb
*/
@Order(Ordered.LOWEST_PRECEDENCE - 100)
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java
index a6d0f93c..dcee8e6a 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java
@@ -21,27 +21,27 @@ import java.util.List;
import org.springframework.cloud.client.ServiceInstance;
/**
- * DiscoveryClient represents read operations commonly available to Discovery service such as
- * Netflix Eureka or consul.io
+ * Represents read operations commonly available to discovery services such as Netflix
+ * Eureka or consul.io.
* @author Spencer Gibb
*/
public interface DiscoveryClient {
/**
- * A human readable description of the implementation, used in HealthIndicator
- * @return the description
+ * A human-readable description of the implementation, used in HealthIndicator.
+ * @return The description.
*/
String description();
/**
- * Get all ServiceInstances associated with a particular serviceId
- * @param serviceId the serviceId to query
- * @return a List of ServiceInstance
+ * Gets all ServiceInstances associated with a particular serviceId.
+ * @param serviceId The serviceId to query.
+ * @return A List of ServiceInstance.
*/
List getInstances(String serviceId);
/**
- * @return all known service ids
+ * @return All known service IDs.
*/
List getServices();
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClient.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClient.java
index 21a328de..4c011f0e 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClient.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClient.java
@@ -9,8 +9,8 @@ import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
/**
- * A {@link DiscoveryClient} composed of other Discovery Client's and will delegate the
- * calls to each of them in order
+ * A {@link DiscoveryClient} that is composed of other discovery clients and delegates
+ * calls to each of them in order.
*
* @author Biju Kunjummen
*/
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientAutoConfiguration.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientAutoConfiguration.java
index b71d28da..cefc0337 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientAutoConfiguration.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/composite/CompositeDiscoveryClientAutoConfiguration.java
@@ -10,7 +10,7 @@ import org.springframework.context.annotation.Primary;
import java.util.List;
/**
- * Auto-configuration for Composite Discovery Client.
+ * Auto-configuration for composite discovery client.
*
* @author Biju Kunjummen
*/
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatEvent.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatEvent.java
index 040c4646..e0e6eac0 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatEvent.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatEvent.java
@@ -19,9 +19,9 @@ package org.springframework.cloud.client.discovery.event;
import org.springframework.context.ApplicationEvent;
/**
- * Event DiscoveryClient implementation can broadcast if they support heartbeat's from the
- * discovery server. Provides listeners with a basic indication of a state change in the
- * service catalog.
+ * An event that a DiscoveryClient implementation can broadcast if it supports
+ * heartbeats from the discovery server. Provides listeners with a basic indication
+ * of a state change in the service catalog.
*
* @author Spencer Gibb
* @author Dave Syer
@@ -32,11 +32,11 @@ public class HeartbeatEvent extends ApplicationEvent {
private final Object state;
/**
- * Create a new event with a source (for example a discovery client) and a value.
+ * Creates a new event with a source (for example, a discovery client) and a value.
* Neither parameter should be relied on to have specific content or format.
*
- * @param source the source of the event
- * @param state the value indicating state of the catalog
+ * @param source The source of the event.
+ * @param state The value indicating state of the catalog.
*/
public HeartbeatEvent(Object source, Object state) {
super(source);
@@ -45,12 +45,12 @@ public class HeartbeatEvent extends ApplicationEvent {
/**
* A value representing the state of the service catalog. The only requirement is that
- * it changes when the catalog is updated, so it can be as simple as a version
- * conuter, or a hash. Implementations can provide information to help users visualize
+ * it changes when the catalog is updated; it can be as simple as a version counter or
+ * a hash. Implementations can provide information to help users visualize
* what is going on in the catalog, but users should not rely on the content (since
* the implementation of the underlying discovery might change).
*
- * @return A value representing state of the service catalog
+ * @return A value representing state of the service catalog.
*/
public Object getValue() {
return this.state;
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatMonitor.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatMonitor.java
index 15d0709b..cfcd0629 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatMonitor.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/event/HeartbeatMonitor.java
@@ -19,8 +19,8 @@ package org.springframework.cloud.client.discovery.event;
import java.util.concurrent.atomic.AtomicReference;
/**
- * Helper class for listeners to the {@link HeartbeatEvent} providing a convenient way to
- * determine if there has been a change in state.
+ * Helper class for listeners to the {@link HeartbeatEvent}, providing a convenient way
+ * to determine if there has been a change in state.
*
* @author Dave Syer
*/
@@ -29,8 +29,8 @@ public class HeartbeatMonitor {
private AtomicReference
*
*
* The scoped proxy approach adopted here has a side benefit that bean instances are
* automatically {@link Serializable}, and can be sent across the wire as long as the
* receiver has an identical application context on the other side. To ensure that the two
- * contexts agree that they are identical they have to have the same serialization id. One
- * will be generated automatically by default from the bean names, so two contexts with
- * the same bean names are by default able to exchange beans by name. If you need to
- * override the default id then provide an explicit {@link #setId(String) id} when the
+ * contexts agree that they are identical, they have to have the same serialization ID.
+ * One will be generated automatically by default from the bean names, so two contexts
+ * with the same bean names are by default able to exchange beans by name. If you need to
+ * override the default ID, then provide an explicit {@link #setId(String) id} when the
* Scope is declared.
*
*
@@ -78,7 +78,7 @@ public class RefreshScope extends GenericScope
private int order = Ordered.LOWEST_PRECEDENCE - 100;
/**
- * Create a scope instance and give it the default name: "refresh".
+ * Creates a scope instance and gives it the default name: "refresh".
*/
public RefreshScope() {
super.setName("refresh");
@@ -97,7 +97,7 @@ public class RefreshScope extends GenericScope
* Flag to determine whether all beans in refresh scope should be instantiated eagerly
* on startup. Default true.
*
- * @param eager the flag to set
+ * @param eager The flag to set.
*/
public void setEager(boolean eager) {
this.eager = eager;
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/thread/ThreadScope.java b/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/thread/ThreadScope.java
index 4b0070be..1db0548d 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/thread/ThreadScope.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/thread/ThreadScope.java
@@ -25,7 +25,7 @@ import org.springframework.cloud.context.scope.GenericScope;
public class ThreadScope extends GenericScope {
/**
- * Create a scope instance and give it the default name: "thread".
+ * Creates a scope instance and gives it the default name: "thread".
*/
public ThreadScope() {
super();
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEvent.java b/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEvent.java
index 62cde168..fafba6df 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEvent.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEvent.java
@@ -4,7 +4,7 @@ import org.springframework.cloud.endpoint.RefreshEndpoint;
import org.springframework.context.ApplicationEvent;
/**
- * Event that triggers a call to {@link RefreshEndpoint#refresh()}
+ * Event that triggers a call to {@link RefreshEndpoint#refresh()}.
* @author Spencer Gibb
*/
@SuppressWarnings("serial")
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEventListener.java b/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEventListener.java
index 6f55cbb7..faefccf4 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEventListener.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEventListener.java
@@ -12,7 +12,7 @@ import org.springframework.context.event.EventListener;
/**
* Calls {@link RefreshEventListener#refresh} when a {@link RefreshEvent} is received.
- * Only responds to {@link RefreshEvent} after receiving an {@link ApplicationReadyEvent} as the RefreshEvent's might come to early in the application lifecycle.
+ * Only responds to {@link RefreshEvent} after receiving an {@link ApplicationReadyEvent}, as the RefreshEvents might come too early in the application lifecycle.
* @author Spencer Gibb
*/
public class RefreshEventListener {
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java b/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
index 48257f56..9b1f0b8b 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/health/RefreshScopeHealthIndicator.java
@@ -27,7 +27,7 @@ import org.springframework.cloud.context.scope.refresh.RefreshScope;
/**
* Health indicator for the refresh scope and configuration properties rebinding. If an
- * environment change causes a bean to fail in instantiate or bind this indicator will
+ * environment change causes a bean to fail in instantiate or bind, this indicator will
* generally say what the problem was and switch to DOWN.
*
* @author Dave Syer
From 6533e0ca53921f4b1a79767b640e36382ba5b756 Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Wed, 15 Aug 2018 14:48:58 -0400
Subject: [PATCH 39/41] Makes ContextRefresher easier to extend.
Adds protected getters for context and scope.
Adds new refreshEnvironment() method.
fixes gh-382
---
.../cloud/context/refresh/ContextRefresher.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java b/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java
index 8c013556..57076a5e 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java
@@ -56,14 +56,27 @@ public class ContextRefresher {
this.scope = scope;
}
+ protected ConfigurableApplicationContext getContext() {
+ return this.context;
+ }
+
+ protected RefreshScope getScope() {
+ return this.scope;
+ }
+
public synchronized Set refresh() {
+ Set keys = refreshEnvironment();
+ this.scope.refreshAll();
+ return keys;
+ }
+
+ public synchronized Set refreshEnvironment() {
Map before = extract(
this.context.getEnvironment().getPropertySources());
addConfigFilesToEnvironment();
Set keys = changes(before,
extract(this.context.getEnvironment().getPropertySources())).keySet();
this.context.publishEvent(new EnvironmentChangeEvent(context, keys));
- this.scope.refreshAll();
return keys;
}
From 23d7eae0387f5c77678f39691604c36ea0d2c922 Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Tue, 21 Aug 2018 11:14:48 -0400
Subject: [PATCH 40/41] Moves away from @EventListener to interface
implementations for framework 5.1 changes
---
.../context/scope/refresh/RefreshScope.java | 10 +++++---
.../endpoint/event/RefreshEventListener.java | 22 +++++++++++++----
.../cloud/endpoint/RefreshEndpointTests.java | 24 +++++++++++--------
3 files changed, 39 insertions(+), 17 deletions(-)
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/refresh/RefreshScope.java b/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/refresh/RefreshScope.java
index ba23a943..994e4a4c 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/refresh/RefreshScope.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/refresh/RefreshScope.java
@@ -21,8 +21,8 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.cloud.context.scope.GenericScope;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
-import org.springframework.context.event.EventListener;
import org.springframework.core.Ordered;
import org.springframework.jmx.export.annotation.ManagedOperation;
import org.springframework.jmx.export.annotation.ManagedResource;
@@ -70,7 +70,7 @@ import org.springframework.jmx.export.annotation.ManagedResource;
*/
@ManagedResource
public class RefreshScope extends GenericScope
- implements ApplicationContextAware, Ordered {
+ implements ApplicationContextAware, ApplicationListener, Ordered {
private ApplicationContext context;
private BeanDefinitionRegistry registry;
@@ -110,7 +110,11 @@ public class RefreshScope extends GenericScope
super.postProcessBeanDefinitionRegistry(registry);
}
- @EventListener
+ @Override
+ public void onApplicationEvent(ContextRefreshedEvent event) {
+ start(event);
+ }
+
public void start(ContextRefreshedEvent event) {
if (event.getApplicationContext() == this.context && this.eager
&& this.registry != null) {
diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEventListener.java b/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEventListener.java
index faefccf4..4452ce29 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEventListener.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/endpoint/event/RefreshEventListener.java
@@ -8,14 +8,15 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.cloud.context.refresh.ContextRefresher;
-import org.springframework.context.event.EventListener;
+import org.springframework.context.ApplicationEvent;
+import org.springframework.context.event.SmartApplicationListener;
/**
* Calls {@link RefreshEventListener#refresh} when a {@link RefreshEvent} is received.
* Only responds to {@link RefreshEvent} after receiving an {@link ApplicationReadyEvent}, as the RefreshEvents might come too early in the application lifecycle.
* @author Spencer Gibb
*/
-public class RefreshEventListener {
+public class RefreshEventListener implements SmartApplicationListener {
private static Log log = LogFactory.getLog(RefreshEventListener.class);
private ContextRefresher refresh;
private AtomicBoolean ready = new AtomicBoolean(false);
@@ -24,12 +25,25 @@ public class RefreshEventListener {
this.refresh = refresh;
}
- @EventListener
+ @Override
+ public boolean supportsEventType(Class extends ApplicationEvent> eventType) {
+ return ApplicationReadyEvent.class.isAssignableFrom(eventType)
+ || RefreshEvent.class.isAssignableFrom(eventType);
+ }
+
+ @Override
+ public void onApplicationEvent(ApplicationEvent event) {
+ if (event instanceof ApplicationReadyEvent) {
+ handle((ApplicationReadyEvent) event);
+ } else if (event instanceof RefreshEvent) {
+ handle((RefreshEvent) event);
+ }
+ }
+
public void handle(ApplicationReadyEvent event) {
this.ready.compareAndSet(false, true);
}
- @EventListener
public void handle(RefreshEvent event) {
if (this.ready.get()) { // don't handle events before app is ready
log.debug("Event received " + event.getEventDesc());
diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/endpoint/RefreshEndpointTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/endpoint/RefreshEndpointTests.java
index 5be7da34..ca256d78 100644
--- a/spring-cloud-context/src/test/java/org/springframework/cloud/endpoint/RefreshEndpointTests.java
+++ b/spring-cloud-context/src/test/java/org/springframework/cloud/endpoint/RefreshEndpointTests.java
@@ -28,6 +28,7 @@ import java.util.List;
import java.util.Map;
import org.junit.After;
+import org.junit.Ignore;
import org.junit.Test;
import org.springframework.boot.Banner.Mode;
import org.springframework.boot.WebApplicationType;
@@ -131,6 +132,7 @@ public class RefreshEndpointTests {
}
@Test
+ @Ignore //FIXME: 2.1.0
public void eventsPublishedInOrder() throws Exception {
this.context = new SpringApplicationBuilder(Empty.class)
.web(WebApplicationType.NONE).bannerMode(Mode.OFF).run();
@@ -146,17 +148,19 @@ public class RefreshEndpointTests {
}
@Test
+ @Ignore //FIXME: 2.1.0
public void shutdownHooksCleaned() {
- ConfigurableApplicationContext context = new SpringApplicationBuilder(Empty.class)
- .web(WebApplicationType.NONE).bannerMode(Mode.OFF).run();
- RefreshScope scope = new RefreshScope();
- scope.setApplicationContext(context);
- ContextRefresher contextRefresher = new ContextRefresher(context, scope);
- RefreshEndpoint endpoint = new RefreshEndpoint(contextRefresher);
- int count = countShutdownHooks();
- endpoint.refresh();
- int after = countShutdownHooks();
- assertEquals("Shutdown hooks not cleaned on refresh", count, after);
+ try (ConfigurableApplicationContext context = new SpringApplicationBuilder(Empty.class)
+ .web(WebApplicationType.NONE).bannerMode(Mode.OFF).run()) {
+ RefreshScope scope = new RefreshScope();
+ scope.setApplicationContext(context);
+ ContextRefresher contextRefresher = new ContextRefresher(context, scope);
+ RefreshEndpoint endpoint = new RefreshEndpoint(contextRefresher);
+ int count = countShutdownHooks();
+ endpoint.refresh();
+ int after = countShutdownHooks();
+ assertEquals("Shutdown hooks not cleaned on refresh", count, after);
+ }
}
private int countShutdownHooks() {
From 1d646290abb5a123e452225178a355593f85565a Mon Sep 17 00:00:00 2001
From: Spencer Gibb
Date: Tue, 21 Aug 2018 11:42:27 -0400
Subject: [PATCH 41/41] Moves away from @EventListener to interface
implementations for framework 5.1 changes
fixes gh-405
---
.../AbstractAutoServiceRegistration.java | 22 +++++++++----
.../cloud/endpoint/RefreshEndpointTests.java | 33 ++++++++++---------
2 files changed, 33 insertions(+), 22 deletions(-)
diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/AbstractAutoServiceRegistration.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/AbstractAutoServiceRegistration.java
index 8fe416e9..70f68b2a 100644
--- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/AbstractAutoServiceRegistration.java
+++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/AbstractAutoServiceRegistration.java
@@ -1,7 +1,13 @@
package org.springframework.cloud.client.serviceregistry;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.annotation.PreDestroy;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.springframework.beans.BeansException;
import org.springframework.boot.web.context.ConfigurableWebServerApplicationContext;
import org.springframework.boot.web.context.WebServerInitializedEvent;
@@ -9,13 +15,9 @@ import org.springframework.cloud.client.discovery.ManagementServerPortUtils;
import org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
-import org.springframework.context.event.EventListener;
+import org.springframework.context.ApplicationListener;
import org.springframework.core.env.Environment;
-import javax.annotation.PreDestroy;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
/**
* Lifecycle methods that may be useful and common to {@link ServiceRegistry}
* implementations.
@@ -27,7 +29,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* @author Spencer Gibb
*/
public abstract class AbstractAutoServiceRegistration
- implements AutoServiceRegistration, ApplicationContextAware {
+ implements AutoServiceRegistration, ApplicationContextAware, ApplicationListener {
private static final Log logger = LogFactory
.getLog(AbstractAutoServiceRegistration.class);
@@ -60,7 +62,13 @@ public abstract class AbstractAutoServiceRegistration
return context;
}
- @EventListener(WebServerInitializedEvent.class)
+ @Override
+ @SuppressWarnings("deprecation")
+ public void onApplicationEvent(WebServerInitializedEvent event) {
+ bind(event);
+ }
+
+ @Deprecated
public void bind(WebServerInitializedEvent event) {
ApplicationContext context = event.getApplicationContext();
if (context instanceof ConfigurableWebServerApplicationContext) {
diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/endpoint/RefreshEndpointTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/endpoint/RefreshEndpointTests.java
index ca256d78..1e562431 100644
--- a/spring-cloud-context/src/test/java/org/springframework/cloud/endpoint/RefreshEndpointTests.java
+++ b/spring-cloud-context/src/test/java/org/springframework/cloud/endpoint/RefreshEndpointTests.java
@@ -16,10 +16,6 @@
package org.springframework.cloud.endpoint;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
@@ -28,8 +24,8 @@ import java.util.List;
import java.util.Map;
import org.junit.After;
-import org.junit.Ignore;
import org.junit.Test;
+
import org.springframework.boot.Banner.Mode;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -43,7 +39,7 @@ import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEven
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.event.EventListener;
+import org.springframework.context.event.SmartApplicationListener;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.PropertySource;
@@ -51,6 +47,10 @@ import org.springframework.stereotype.Component;
import org.springframework.util.ClassUtils;
import org.springframework.util.ReflectionUtils;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
/**
* @author Dave Syer
* @author Venil Noronha
@@ -132,7 +132,6 @@ public class RefreshEndpointTests {
}
@Test
- @Ignore //FIXME: 2.1.0
public void eventsPublishedInOrder() throws Exception {
this.context = new SpringApplicationBuilder(Empty.class)
.web(WebApplicationType.NONE).bannerMode(Mode.OFF).run();
@@ -148,7 +147,6 @@ public class RefreshEndpointTests {
}
@Test
- @Ignore //FIXME: 2.1.0
public void shutdownHooksCleaned() {
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(Empty.class)
.web(WebApplicationType.NONE).bannerMode(Mode.OFF).run()) {
@@ -174,17 +172,22 @@ public class RefreshEndpointTests {
}
@Configuration
- protected static class Empty {
+ protected static class Empty implements SmartApplicationListener {
private List events = new ArrayList();
- @EventListener(EnvironmentChangeEvent.class)
- public void changed(EnvironmentChangeEvent event) {
- this.events.add(event);
+
+ @Override
+ public boolean supportsEventType(Class extends ApplicationEvent> eventType) {
+ return EnvironmentChangeEvent.class.isAssignableFrom(eventType)
+ || RefreshScopeRefreshedEvent.class.isAssignableFrom(eventType);
}
- @EventListener(RefreshScopeRefreshedEvent.class)
- public void refreshed(RefreshScopeRefreshedEvent event) {
- this.events.add(event);
+ @Override
+ public void onApplicationEvent(ApplicationEvent event) {
+ if (event instanceof EnvironmentChangeEvent ||
+ event instanceof RefreshScopeRefreshedEvent) {
+ this.events.add(event);
+ }
}
}