Commit 89a6f833 authored by Phillip Webb's avatar Phillip Webb

Fix and improve SpringApplicationBuilder javadoc

Update SpringApplicationBuilder.properties method javadoc to fix
inaccuracies and apply more consistency.

Closes gh-22962
parent 3e939cba
...@@ -394,9 +394,12 @@ public class SpringApplicationBuilder { ...@@ -394,9 +394,12 @@ public class SpringApplicationBuilder {
/** /**
* Default properties for the environment in the form {@code key=value} or * Default properties for the environment in the form {@code key=value} or
* {@code key:value}. * {@code key:value}. Multiple calls to this method are cumulative and will not clear
* any previously set properties.
* @param defaultProperties the properties to set. * @param defaultProperties the properties to set.
* @return the current builder * @return the current builder
* @see SpringApplicationBuilder#properties(Properties)
* @see SpringApplicationBuilder#properties(Map)
*/ */
public SpringApplicationBuilder properties(String... defaultProperties) { public SpringApplicationBuilder properties(String... defaultProperties) {
return properties(getMapFromKeyValuePairs(defaultProperties)); return properties(getMapFromKeyValuePairs(defaultProperties));
...@@ -425,10 +428,12 @@ public class SpringApplicationBuilder { ...@@ -425,10 +428,12 @@ public class SpringApplicationBuilder {
} }
/** /**
* Default properties for the environment in the form {@code key=value} or * Default properties for the environment.Multiple calls to this method are cumulative
* {@code key:value}. * and will not clear any previously set properties.
* @param defaultProperties the properties to set. * @param defaultProperties the properties to set.
* @return the current builder * @return the current builder
* @see SpringApplicationBuilder#properties(String...)
* @see SpringApplicationBuilder#properties(Map)
*/ */
public SpringApplicationBuilder properties(Properties defaultProperties) { public SpringApplicationBuilder properties(Properties defaultProperties) {
return properties(getMapFromProperties(defaultProperties)); return properties(getMapFromProperties(defaultProperties));
...@@ -444,10 +449,11 @@ public class SpringApplicationBuilder { ...@@ -444,10 +449,11 @@ public class SpringApplicationBuilder {
/** /**
* Default properties for the environment. Multiple calls to this method are * Default properties for the environment. Multiple calls to this method are
* cumulative. * cumulative and will not clear any previously set properties.
* @param defaults the default properties * @param defaults the default properties
* @return the current builder * @return the current builder
* @see SpringApplicationBuilder#properties(String...) * @see SpringApplicationBuilder#properties(String...)
* @see SpringApplicationBuilder#properties(Properties)
*/ */
public SpringApplicationBuilder properties(Map<String, Object> defaults) { public SpringApplicationBuilder properties(Map<String, Object> defaults) {
this.defaultProperties.putAll(defaults); this.defaultProperties.putAll(defaults);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment