Skip to content

Commit a77fee9

Browse files
boostrackDave Syer
authored andcommitted
Fix typo and use *PropertySource* instead *ProperySource*
Fixes gh-705
1 parent f7c1676 commit a77fee9

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ sensible overriding of values, properties are considered in the the following or
199199
. Command line arguments.
200200
. Java System properties (`System.getProperties()`).
201201
. OS environment variables.
202-
. A `RandomValueProperySource` that only has properties in `random.*`.
202+
. A `RandomValuePropertySource` that only has properties in `random.*`.
203203
. `@PropertySource` annotations on your `@Configuration` classes.
204204
. Application properties outside of your packaged jar (`application.properties`
205205
including YAML and profile variants).
@@ -231,7 +231,7 @@ default `name`. When running in production, an `application.properties` can be p
231231
outside of your jar that overrides `name`; and for one-off testing, you can launch with
232232
a specific command line switch (e.g. `java -jar app.jar --name="Spring"`).
233233

234-
The `RandomValueProperySource` is useful for injecting random values
234+
The `RandomValuePropertySource` is useful for injecting random values
235235
(e.g. into secrets or test cases). It can produce integers, longs or
236236
strings, e.g.
237237

spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public void setSearchNames(String names) {
218218

219219
/**
220220
* {@link BeanFactoryPostProcessor} to re-order our property sources below any
221-
* {@code @ProperySource} items added by the {@link ConfigurationClassPostProcessor}.
221+
* {@code @PropertySource} items added by the {@link ConfigurationClassPostProcessor}.
222222
*/
223223
private class PropertySourceOrderingPostProcessor implements
224224
BeanFactoryPostProcessor, Ordered {

spring-boot/src/main/resources/META-INF/spring.factories

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ProperySource Loaders
1+
# PropertySource Loaders
22
org.springframework.boot.env.PropertySourceLoader=\
33
org.springframework.boot.env.PropertiesPropertySourceLoader,\
44
org.springframework.boot.env.YamlPropertySourceLoader

spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,10 @@ public void specificResource() throws Exception {
388388
this.initializer.onApplicationEvent(this.event);
389389
String property = this.environment.getProperty("my.property");
390390
assertThat(property, equalTo("fromspecificlocation"));
391-
assertThat(this.environment, containsProperySource("applicationConfig: "
391+
assertThat(this.environment, containsPropertySource("applicationConfig: "
392392
+ "[classpath:specificlocation.properties]"));
393393
// The default property source is still there
394-
assertThat(this.environment, containsProperySource("applicationConfig: "
394+
assertThat(this.environment, containsPropertySource("applicationConfig: "
395395
+ "[classpath:/application.properties]"));
396396
assertThat(this.environment.getProperty("foo"), equalTo("bucket"));
397397
}
@@ -402,7 +402,7 @@ public void specificResourceAsFile() throws Exception {
402402
EnvironmentTestUtils.addEnvironment(this.environment, "spring.config.location:"
403403
+ location);
404404
this.initializer.onApplicationEvent(this.event);
405-
assertThat(this.environment, containsProperySource("applicationConfig: ["
405+
assertThat(this.environment, containsPropertySource("applicationConfig: ["
406406
+ location + "]"));
407407
}
408408

@@ -412,7 +412,7 @@ public void specificResourceDefaultsToFile() throws Exception {
412412
EnvironmentTestUtils.addEnvironment(this.environment, "spring.config.location:"
413413
+ location);
414414
this.initializer.onApplicationEvent(this.event);
415-
assertThat(this.environment, containsProperySource("applicationConfig: [file:"
415+
assertThat(this.environment, containsPropertySource("applicationConfig: [file:"
416416
+ location + "]"));
417417
}
418418

@@ -423,7 +423,7 @@ public void propertySourceAnnotation() throws Exception {
423423
ConfigurableApplicationContext context = application.run();
424424
String property = context.getEnvironment().getProperty("my.property");
425425
assertThat(property, equalTo("fromspecificlocation"));
426-
assertThat(context.getEnvironment(), containsProperySource("class path resource "
426+
assertThat(context.getEnvironment(), containsPropertySource("class path resource "
427427
+ "[specificlocation.properties]"));
428428
context.close();
429429
}
@@ -439,7 +439,7 @@ public void propertySourceAnnotationWithPlaceholder() throws Exception {
439439
ConfigurableApplicationContext context = application.run();
440440
String property = context.getEnvironment().getProperty("my.property");
441441
assertThat(property, equalTo("fromspecificlocation"));
442-
assertThat(context.getEnvironment(), containsProperySource("class path resource "
442+
assertThat(context.getEnvironment(), containsPropertySource("class path resource "
443443
+ "[specificlocation.properties]"));
444444
context.close();
445445
}
@@ -452,7 +452,7 @@ public void propertySourceAnnotationWithName() throws Exception {
452452
ConfigurableApplicationContext context = application.run();
453453
String property = context.getEnvironment().getProperty("my.property");
454454
assertThat(property, equalTo("fromspecificlocation"));
455-
assertThat(context.getEnvironment(), containsProperySource("foo"));
455+
assertThat(context.getEnvironment(), containsPropertySource("foo"));
456456
context.close();
457457
}
458458

@@ -465,9 +465,9 @@ public void propertySourceAnnotationInProfile() throws Exception {
465465
.run("--spring.profiles.active=myprofile");
466466
String property = context.getEnvironment().getProperty("my.property");
467467
assertThat(property, equalTo("frompropertiesfile"));
468-
assertThat(context.getEnvironment(), containsProperySource("class path resource "
468+
assertThat(context.getEnvironment(), containsPropertySource("class path resource "
469469
+ "[enableprofile.properties]"));
470-
assertThat(context.getEnvironment(), not(containsProperySource("classpath:/"
470+
assertThat(context.getEnvironment(), not(containsPropertySource("classpath:/"
471471
+ "enableprofile-myprofile.properties")));
472472
context.close();
473473
}
@@ -480,7 +480,7 @@ public void propertySourceAnnotationAndNonActiveProfile() throws Exception {
480480
ConfigurableApplicationContext context = application.run();
481481
String property = context.getEnvironment().getProperty("my.property");
482482
assertThat(property, equalTo("fromapplicationproperties"));
483-
assertThat(context.getEnvironment(), not(containsProperySource("classpath:"
483+
assertThat(context.getEnvironment(), not(containsPropertySource("classpath:"
484484
+ "/enableprofile-myprofile.properties")));
485485
context.close();
486486
}
@@ -493,7 +493,7 @@ public void propertySourceAnnotationMultipleLocations() throws Exception {
493493
ConfigurableApplicationContext context = application.run();
494494
String property = context.getEnvironment().getProperty("my.property");
495495
assertThat(property, equalTo("frommorepropertiesfile"));
496-
assertThat(context.getEnvironment(), containsProperySource("class path resource "
496+
assertThat(context.getEnvironment(), containsPropertySource("class path resource "
497497
+ "[specificlocation.properties]"));
498498
context.close();
499499
}
@@ -506,7 +506,7 @@ public void propertySourceAnnotationMultipleLocationsAndName() throws Exception
506506
ConfigurableApplicationContext context = application.run();
507507
String property = context.getEnvironment().getProperty("my.property");
508508
assertThat(property, equalTo("frommorepropertiesfile"));
509-
assertThat(context.getEnvironment(), containsProperySource("foo"));
509+
assertThat(context.getEnvironment(), containsPropertySource("foo"));
510510
context.close();
511511
}
512512

@@ -545,7 +545,7 @@ public void bindsToSpringApplication() throws Exception {
545545
assertThat((Boolean) field.get(application), equalTo(false));
546546
}
547547

548-
private static Matcher<? super ConfigurableEnvironment> containsProperySource(
548+
private static Matcher<? super ConfigurableEnvironment> containsPropertySource(
549549
final String sourceName) {
550550
return new TypeSafeDiagnosingMatcher<ConfigurableEnvironment>() {
551551
@Override

0 commit comments

Comments
 (0)