commit
270317728f
|
|
@ -195,7 +195,7 @@ public class WebFluxAutoConfigurationTests {
|
|||
assertThat(validator).isInstanceOf(ValidatorAdapter.class);
|
||||
Object defaultValidator = this.context.getBean("defaultValidator");
|
||||
assertThat(((ValidatorAdapter) validator).getTarget()).isSameAs(defaultValidator);
|
||||
// Primary Spring validator is the one use by WebFlux behind the scenes
|
||||
// Primary Spring validator is the one used by WebFlux behind the scenes
|
||||
assertThat(this.context.getBean(Validator.class)).isEqualTo(defaultValidator);
|
||||
}
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ public class WebFluxAutoConfigurationTests {
|
|||
assertThat(validator).isInstanceOf(ValidatorAdapter.class);
|
||||
Object defaultValidator = this.context.getBean("defaultValidator");
|
||||
assertThat(((ValidatorAdapter) validator).getTarget()).isSameAs(defaultValidator);
|
||||
// Primary Spring validator is the one use by WebFlux behind the scenes
|
||||
// Primary Spring validator is the one used by WebFlux behind the scenes
|
||||
assertThat(this.context.getBean(Validator.class)).isEqualTo(defaultValidator);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ import org.springframework.boot.configurationsample.specific.DoubleRegistrationP
|
|||
import org.springframework.boot.configurationsample.specific.ExcludedTypesPojo;
|
||||
import org.springframework.boot.configurationsample.specific.GenericConfig;
|
||||
import org.springframework.boot.configurationsample.specific.InnerClassAnnotatedGetterConfig;
|
||||
import org.springframework.boot.configurationsample.specific.InnerClassHierachicalProperties;
|
||||
import org.springframework.boot.configurationsample.specific.InnerClassHierarchicalProperties;
|
||||
import org.springframework.boot.configurationsample.specific.InnerClassProperties;
|
||||
import org.springframework.boot.configurationsample.specific.InnerClassRootConfig;
|
||||
import org.springframework.boot.configurationsample.specific.InvalidAccessorProperties;
|
||||
|
|
@ -350,14 +350,14 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void innerClassPropertiesHierachical() throws Exception {
|
||||
ConfigurationMetadata metadata = compile(InnerClassHierachicalProperties.class);
|
||||
public void innerClassPropertiesHierarchical() throws Exception {
|
||||
ConfigurationMetadata metadata = compile(InnerClassHierarchicalProperties.class);
|
||||
assertThat(metadata).has(Metadata.withGroup("config.foo")
|
||||
.ofType(InnerClassHierachicalProperties.Foo.class));
|
||||
.ofType(InnerClassHierarchicalProperties.Foo.class));
|
||||
assertThat(metadata).has(Metadata.withGroup("config.foo.bar")
|
||||
.ofType(InnerClassHierachicalProperties.Bar.class));
|
||||
.ofType(InnerClassHierarchicalProperties.Bar.class));
|
||||
assertThat(metadata).has(Metadata.withGroup("config.foo.bar.baz")
|
||||
.ofType(InnerClassHierachicalProperties.Foo.Baz.class));
|
||||
.ofType(InnerClassHierarchicalProperties.Foo.Baz.class));
|
||||
assertThat(metadata).has(Metadata.withProperty("config.foo.bar.baz.blah"));
|
||||
assertThat(metadata).has(Metadata.withProperty("config.foo.bar.bling"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
|
|||
* @author Madhura Bhave
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "config")
|
||||
public class InnerClassHierachicalProperties {
|
||||
public class InnerClassHierarchicalProperties {
|
||||
|
||||
private Foo foo;
|
||||
|
||||
|
|
@ -1118,7 +1118,7 @@ public class SpringApplication {
|
|||
* <p>
|
||||
* The sources here are added to those that were set in the constructor. Most users
|
||||
* should consider using {@link #getSources()}/{@link #setSources(Set)} rather than
|
||||
* this calling method.
|
||||
* calling this method.
|
||||
* @param additionalPrimarySources the additional primary sources to add
|
||||
* @see #SpringApplication(Class...)
|
||||
* @see #getSources()
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
|
|||
}
|
||||
for (PropertySourceLoader loader : this.propertySourceLoaders) {
|
||||
for (String ext : loader.getFileExtensions()) {
|
||||
loadForFileExtention(loader, profile, location + name, "." + ext);
|
||||
loadForFileExtension(loader, profile, location + name, "." + ext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -411,7 +411,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
|
|||
.anyMatch(name.toLowerCase()::endsWith);
|
||||
}
|
||||
|
||||
private void loadForFileExtention(PropertySourceLoader loader, Profile profile,
|
||||
private void loadForFileExtension(PropertySourceLoader loader, Profile profile,
|
||||
String prefix, String ext) {
|
||||
if (profile != null) {
|
||||
// Try the profile-specific file
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
package org.springframework.boot.context.properties.bind;
|
||||
|
||||
import org.springframework.boot.context.properties.source.ConfigurationPropertyName;
|
||||
import org.springframework.boot.context.properties.source.ConfigurationPropertySource;
|
||||
|
||||
/**
|
||||
* Internal strategy used by {@link Binder} to bind beans.
|
||||
|
|
@ -31,9 +30,7 @@ interface BeanBinder {
|
|||
* Return a bound bean instance or {@code null} if the {@link BeanBinder} does not
|
||||
* support the specified {@link Bindable}.
|
||||
* @param name the name being bound
|
||||
* @param target the bindable to bind names from underlying
|
||||
* {@link ConfigurationPropertySource} cannot be iterated this method can be
|
||||
* {@code false}, even though binding may ultimately succeed.
|
||||
* @param target the bindable to bind
|
||||
* @param context the bind context
|
||||
* @param propertyBinder property binder
|
||||
* @param <T> The source type
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ public class ConfigurationPropertyNameTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void adapShouldStripInvalidChars() throws Exception {
|
||||
public void adaptShouldStripInvalidChars() throws Exception {
|
||||
ConfigurationPropertyName name = ConfigurationPropertyName.adapt("f@@.b%r", '.');
|
||||
assertThat(name.getElement(0, Form.UNIFORM)).isEqualTo("f");
|
||||
assertThat(name.getElement(0, Form.ORIGINAL)).isEqualTo("f");
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class ConfigurationPropertySourcesTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void environmentProperyExpansionShouldWorkWhenAttached() throws Exception {
|
||||
public void environmentPropertyExpansionShouldWorkWhenAttached() throws Exception {
|
||||
ConfigurableEnvironment environment = new StandardEnvironment();
|
||||
Map<String, Object> source = new LinkedHashMap<>();
|
||||
source.put("fooBar", "Spring ${barBaz} ${bar-baz}");
|
||||
|
|
@ -102,7 +102,7 @@ public class ConfigurationPropertySourcesTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void fromPropertySourcseShouldFlattenPropertySources() throws Exception {
|
||||
public void fromPropertySourceShouldFlattenPropertySources() throws Exception {
|
||||
StandardEnvironment environment = new StandardEnvironment();
|
||||
environment.getPropertySources().addFirst(new MapPropertySource("foo",
|
||||
Collections.<String, Object>singletonMap("foo", "bar")));
|
||||
|
|
|
|||
Loading…
Reference in New Issue