Fix and improve SpringApplicationBuilder javadoc

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

Closes gh-22962
This commit is contained in:
Phillip Webb
2020-08-14 17:06:39 -07:00
parent 3e939cbabd
commit 89a6f83344

View File

@@ -394,9 +394,12 @@ public class SpringApplicationBuilder {
/**
* 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.
* @return the current builder
* @see SpringApplicationBuilder#properties(Properties)
* @see SpringApplicationBuilder#properties(Map)
*/
public SpringApplicationBuilder properties(String... defaultProperties) {
return properties(getMapFromKeyValuePairs(defaultProperties));
@@ -425,10 +428,12 @@ public class SpringApplicationBuilder {
}
/**
* Default properties for the environment in the form {@code key=value} or
* {@code key:value}.
* Default properties for the environment.Multiple calls to this method are cumulative
* and will not clear any previously set properties.
* @param defaultProperties the properties to set.
* @return the current builder
* @see SpringApplicationBuilder#properties(String...)
* @see SpringApplicationBuilder#properties(Map)
*/
public SpringApplicationBuilder properties(Properties defaultProperties) {
return properties(getMapFromProperties(defaultProperties));
@@ -444,10 +449,11 @@ public class SpringApplicationBuilder {
/**
* 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
* @return the current builder
* @see SpringApplicationBuilder#properties(String...)
* @see SpringApplicationBuilder#properties(Properties)
*/
public SpringApplicationBuilder properties(Map<String, Object> defaults) {
this.defaultProperties.putAll(defaults);