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