Browse Source

Merge branch '2.0.x'

pull/13377/merge
Madhura Bhave 8 years ago
parent
commit
dcb172fe2a
  1. 2
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java
  2. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcherTests.java

2
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcher.java

@ -88,7 +88,7 @@ public abstract class ApplicationContextServerWebExchangeMatcher<C> @@ -88,7 +88,7 @@ public abstract class ApplicationContextServerWebExchangeMatcher<C>
@SuppressWarnings("unchecked")
private Supplier<C> createContext(ServerWebExchange exchange) {
ApplicationContext context = exchange.getApplicationContext();
Assert.state(context != null, "No WebApplicationContext found.");
Assert.state(context != null, "No ApplicationContext found.");
if (this.contextClass.isInstance(context)) {
return () -> (C) context;
}

2
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/security/reactive/ApplicationContextServerWebExchangeMatcherTests.java

@ -91,7 +91,7 @@ public class ApplicationContextServerWebExchangeMatcherTests { @@ -91,7 +91,7 @@ public class ApplicationContextServerWebExchangeMatcherTests {
MockServerWebExchange exchange = MockServerWebExchange
.from(MockServerHttpRequest.get("/path").build());
this.thrown.expect(IllegalStateException.class);
this.thrown.expectMessage("No WebApplicationContext found.");
this.thrown.expectMessage("No ApplicationContext found.");
new TestApplicationContextServerWebExchangeMatcher<>(ExistingBean.class)
.callMatchesAndReturnProvidedContext(exchange);
}

Loading…
Cancel
Save