Commit 3e9c2b84 authored by Stephane Nicoll's avatar Stephane Nicoll

Fix default ReactiveWebApplicationContext class

Closes gh-11074
parent 382267d6
...@@ -175,7 +175,7 @@ public class SpringApplication { ...@@ -175,7 +175,7 @@ public class SpringApplication {
* environments. * environments.
*/ */
public static final String DEFAULT_REACTIVE_WEB_CONTEXT_CLASS = "org.springframework." public static final String DEFAULT_REACTIVE_WEB_CONTEXT_CLASS = "org.springframework."
+ "boot.web.reactive.context.ReactiveWebServerApplicationContext"; + "boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext";
private static final String REACTIVE_WEB_ENVIRONMENT_CLASS = "org.springframework." private static final String REACTIVE_WEB_ENVIRONMENT_CLASS = "org.springframework."
+ "web.reactive.DispatcherHandler"; + "web.reactive.DispatcherHandler";
......
...@@ -57,8 +57,8 @@ import org.springframework.boot.context.event.ApplicationStartingEvent; ...@@ -57,8 +57,8 @@ import org.springframework.boot.context.event.ApplicationStartingEvent;
import org.springframework.boot.testsupport.rule.OutputCapture; import org.springframework.boot.testsupport.rule.OutputCapture;
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory; import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext;
import org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext; import org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext;
import org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext;
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext; import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; import org.springframework.context.ApplicationContextAware;
...@@ -405,12 +405,13 @@ public class SpringApplicationTests { ...@@ -405,12 +405,13 @@ public class SpringApplicationTests {
} }
@Test @Test
public void defaultApplicationContextForReactiveWeb() throws Exception { public void defaultApplicationContextForReactiveWeb() {
SpringApplication application = new SpringApplication( SpringApplication application = new SpringApplication(
ExampleReactiveWebConfig.class); ExampleReactiveWebConfig.class);
application.setWebApplicationType(WebApplicationType.REACTIVE); application.setWebApplicationType(WebApplicationType.REACTIVE);
this.context = application.run(); this.context = application.run();
assertThat(this.context).isInstanceOf(ReactiveWebServerApplicationContext.class); assertThat(this.context).isInstanceOf(
AnnotationConfigReactiveWebServerApplicationContext.class);
} }
@Test @Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment