|
|
@ -1124,9 +1124,9 @@ public class SpringApplicationTests {
|
|
|
|
public void webApplicationConfiguredViaAPropertyHasTheCorrectTypeOfContextAndEnvironment() {
|
|
|
|
public void webApplicationConfiguredViaAPropertyHasTheCorrectTypeOfContextAndEnvironment() {
|
|
|
|
ConfigurableApplicationContext context = new SpringApplication(
|
|
|
|
ConfigurableApplicationContext context = new SpringApplication(
|
|
|
|
ExampleWebConfig.class).run("--spring.main.web-application-type=servlet");
|
|
|
|
ExampleWebConfig.class).run("--spring.main.web-application-type=servlet");
|
|
|
|
assertThat(context).isInstanceOfAny(WebApplicationContext.class);
|
|
|
|
assertThat(context).isInstanceOf(WebApplicationContext.class);
|
|
|
|
assertThat(context.getEnvironment())
|
|
|
|
assertThat(context.getEnvironment())
|
|
|
|
.isInstanceOfAny(StandardServletEnvironment.class);
|
|
|
|
.isInstanceOf(StandardServletEnvironment.class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -1134,9 +1134,9 @@ public class SpringApplicationTests {
|
|
|
|
ConfigurableApplicationContext context = new SpringApplication(
|
|
|
|
ConfigurableApplicationContext context = new SpringApplication(
|
|
|
|
ExampleReactiveWebConfig.class)
|
|
|
|
ExampleReactiveWebConfig.class)
|
|
|
|
.run("--spring.main.web-application-type=reactive");
|
|
|
|
.run("--spring.main.web-application-type=reactive");
|
|
|
|
assertThat(context).isInstanceOfAny(ReactiveWebApplicationContext.class);
|
|
|
|
assertThat(context).isInstanceOf(ReactiveWebApplicationContext.class);
|
|
|
|
assertThat(context.getEnvironment())
|
|
|
|
assertThat(context.getEnvironment())
|
|
|
|
.isInstanceOfAny(StandardReactiveWebEnvironment.class);
|
|
|
|
.isInstanceOf(StandardReactiveWebEnvironment.class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -1144,9 +1144,9 @@ public class SpringApplicationTests {
|
|
|
|
ConfigurableApplicationContext context = new SpringApplication(
|
|
|
|
ConfigurableApplicationContext context = new SpringApplication(
|
|
|
|
ExampleReactiveWebConfig.class)
|
|
|
|
ExampleReactiveWebConfig.class)
|
|
|
|
.run("--spring.profiles.active=withwebapplicationtype");
|
|
|
|
.run("--spring.profiles.active=withwebapplicationtype");
|
|
|
|
assertThat(context).isInstanceOfAny(ReactiveWebApplicationContext.class);
|
|
|
|
assertThat(context).isInstanceOf(ReactiveWebApplicationContext.class);
|
|
|
|
assertThat(context.getEnvironment())
|
|
|
|
assertThat(context.getEnvironment())
|
|
|
|
.isInstanceOfAny(StandardReactiveWebEnvironment.class);
|
|
|
|
.isInstanceOf(StandardReactiveWebEnvironment.class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|