|
|
@ -1122,9 +1122,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
|
|
|
@ -1132,9 +1132,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
|
|
|
@ -1142,9 +1142,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
|
|
|
|