Browse Source

Merge branch '2.0.x'

pull/13534/head
Andy Wilkinson 8 years ago
parent
commit
20546024d3
  1. 5
      spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTestContextBootstrapper.java
  2. 5
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

5
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTestContextBootstrapper.java

@ -86,6 +86,8 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr @@ -86,6 +86,8 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
private static final String MVC_WEB_ENVIRONMENT_CLASS = "org.springframework."
+ "web.servlet.DispatcherServlet";
private static final String JERSEY_WEB_ENVIRONMENT_CLASS = "org.glassfish.jersey.server.ResourceConfig";
private static final String ACTIVATE_SERVLET_LISTENER = "org.springframework.test."
+ "context.web.ServletTestExecutionListener.activateListener";
@ -192,7 +194,8 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr @@ -192,7 +194,8 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
private WebApplicationType deduceWebApplicationType() {
if (ClassUtils.isPresent(REACTIVE_WEB_ENVIRONMENT_CLASS, null)
&& !ClassUtils.isPresent(MVC_WEB_ENVIRONMENT_CLASS, null)) {
&& !ClassUtils.isPresent(MVC_WEB_ENVIRONMENT_CLASS, null)
&& !ClassUtils.isPresent(JERSEY_WEB_ENVIRONMENT_CLASS, null)) {
return WebApplicationType.REACTIVE;
}
for (String className : WEB_ENVIRONMENT_CLASSES) {

5
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

@ -183,6 +183,8 @@ public class SpringApplication { @@ -183,6 +183,8 @@ public class SpringApplication {
private static final String MVC_WEB_ENVIRONMENT_CLASS = "org.springframework."
+ "web.servlet.DispatcherServlet";
private static final String JERSEY_WEB_ENVIRONMENT_CLASS = "org.glassfish.jersey.server.ResourceConfig";
/**
* Default banner location.
*/
@ -271,7 +273,8 @@ public class SpringApplication { @@ -271,7 +273,8 @@ public class SpringApplication {
private WebApplicationType deduceWebApplicationType() {
if (ClassUtils.isPresent(REACTIVE_WEB_ENVIRONMENT_CLASS, null)
&& !ClassUtils.isPresent(MVC_WEB_ENVIRONMENT_CLASS, null)) {
&& !ClassUtils.isPresent(MVC_WEB_ENVIRONMENT_CLASS, null)
&& !ClassUtils.isPresent(JERSEY_WEB_ENVIRONMENT_CLASS, null)) {
return WebApplicationType.REACTIVE;
}
for (String className : WEB_ENVIRONMENT_CLASSES) {

Loading…
Cancel
Save