diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java index 5f7efcd0f5e..33e0707fd1f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java @@ -381,16 +381,6 @@ public class SpringApplicationBuilder { return this; } - /** - * Default properties for the environment in the form {@code key=value} or - * {@code key:value}. - * @param defaultProperties the properties to set. - * @return the current builder - */ - public SpringApplicationBuilder properties(String... defaultProperties) { - return properties(getMapFromKeyValuePairs(defaultProperties)); - } - /** * Flag to control whether the application should be initialized lazily. * @param lazyInitialization the flag to set. Defaults to false. @@ -402,6 +392,16 @@ public class SpringApplicationBuilder { return this; } + /** + * Default properties for the environment in the form {@code key=value} or + * {@code key:value}. + * @param defaultProperties the properties to set. + * @return the current builder + */ + public SpringApplicationBuilder properties(String... defaultProperties) { + return properties(getMapFromKeyValuePairs(defaultProperties)); + } + private Map getMapFromKeyValuePairs(String[] properties) { Map map = new HashMap<>(); for (String property : properties) {