You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Greenwich and prior releases setting spring.config.name in bootstrap.[yml | properties] would cause boot to look for a configuration file equal to spring.config.name. This does not work in master (Hoxton). To reproduce add a file called confignamebootstrap.properties to /test/resources and place the following properties in the file
Then in BootstrapConfigurationTests add the following test
@Test
public void configNameInBootstrap() {
System.setProperty("expected.name", "main");
this.context = new SpringApplicationBuilder().web(WebApplicationType.NONE)
.properties("spring.cloud.bootstrap.name:confignamebootstrap")
.sources(BareConfiguration.class).run();
then(this.context.getEnvironment().getProperty("spring.application.name"))
.isEqualTo("app");
// The parent is called "main" because spring.application.name is specified in
// other.properties (the bootstrap properties)
then(this.context.getParent().getEnvironment()
.getProperty("spring.application.name")).isEqualTo("main");
// The bootstrap context has the same "bootstrap" property source
then(((ConfigurableEnvironment) this.context.getParent().getEnvironment())
.getPropertySources().get("bootstrap"))
.isEqualTo(this.context.getEnvironment().getPropertySources()
.get("bootstrap"));
then(this.context.getId()).isEqualTo("main-1");
}
This test passes in 2.1.x but fails in master.
The text was updated successfully, but these errors were encountered:
In Greenwich and prior releases setting
spring.config.name
inbootstrap.[yml | properties]
would cause boot to look for a configuration file equal tospring.config.name
. This does not work in master (Hoxton). To reproduce add a file calledconfignamebootstrap.properties
to/test/resources
and place the following properties in the fileThen in
BootstrapConfigurationTests
add the following testThis test passes in 2.1.x but fails in master.
The text was updated successfully, but these errors were encountered: