diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 6c8a9ae5a5..61e73af5a4 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -276,14 +276,14 @@ or $ java -jar myproject.jar --spring.config.location=classpath:/default.properties,classpath:/override.properties ---- -If `spring.config.location` contains directories (as opposed to files) -they should end in "/" (and will be appended with the names generated -from `spring.config.name` before being loaded). The default search -path `classpath:,classpath:/config,file:,file:config/` is always used, -irrespective of the value of `spring.config.location`. In that way you -can set up default values for your app in `application.properties` (or -whatever other basename you choose with `spring.config.name`) and -override it at runtime with a different file, keeping the defaults. +If `spring.config.location` contains directories (as opposed to files) they should end +in `/` (and will be appended with the names generated from `spring.config.name` before +being loaded). The default search path `classpath:,classpath:/config,file:,file:config/` +is always used, irrespective of the value of `spring.config.location`. In that way you +can set up default values for your application in `application.properties` (or whatever +other basename you choose with `spring.config.name`) and override it at runtime with a +different file, keeping the defaults. + [[boot-features-external-config-profile-specific-properties]] diff --git a/spring-boot/src/main/java/org/springframework/boot/env/EnumerableCompositePropertySource.java b/spring-boot/src/main/java/org/springframework/boot/env/EnumerableCompositePropertySource.java index 9feaff94a6..61cc860d52 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/EnumerableCompositePropertySource.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/EnumerableCompositePropertySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2014 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. diff --git a/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java b/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java index 4881ba0c58..44e783429e 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java @@ -68,26 +68,24 @@ public class PropertySourcesLoader { * @throws IOException */ public PropertySource load(Resource resource) throws IOException { - return this.load(resource, null); + return load(resource, null); } /** * Load the profile-specific properties from the specified resource (if any) and add * it as the first source. - * * @param resource the source resource (may be {@code null}). * @param profile a specific profile to load or {@code null} to load the default. * @return the loaded property source or {@code null} * @throws IOException */ public PropertySource load(Resource resource, String profile) throws IOException { - return this.load(resource, resource.getDescription(), profile); + return load(resource, resource.getDescription(), profile); } /** * Load the profile-specific properties from the specified resource (if any), give the * name provided and add it as the first source. - * * @param resource the source resource (may be {@code null}). * @param name the root property name (may be {@code null}). * @param profile a specific profile to load or {@code null} to load the default. @@ -96,7 +94,7 @@ public class PropertySourcesLoader { */ public PropertySource load(Resource resource, String name, String profile) throws IOException { - return this.load(resource, null, name, profile); + return load(resource, null, name, profile); } /** @@ -108,7 +106,6 @@ public class PropertySourcesLoader { * groups afterwards (with the highest priority last). Property resolution from the * resulting sources will consider all keys for a given group first and then move to * the next group. - * * @param resource the source resource (may be {@code null}). * @param group an identifier for the group that this source belongs to * @param name the root property name (may be {@code null}).